Skip to content

Instantly share code, notes, and snippets.

@benolee
Created June 30, 2013 02:57
Show Gist options
  • Save benolee/5893626 to your computer and use it in GitHub Desktop.
Save benolee/5893626 to your computer and use it in GitHub Desktop.
programmatically-created RubyVM::InstructionSequences always use toplevel binding
class Foo
define_method(:bar, &RubyVM::InstructionSequence.new('self').method(:eval))
end
Foo.new.bar
#=> main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment