Skip to content

Module.instance_eval not working #5528

Description

@sasq64

The following code fails with
uninitialized constant #<Class:0x68fa70>::A (NameError)

     m = Module.new
     m.instance_eval("
     class A end
     class B
         def initialize()
             p A
         end
     end
     B.new
")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions