Skip to content

Instantly share code, notes, and snippets.

@rue

rue/gist:1303560

Created Oct 21, 2011
Embed
What would you like to do?
foo = 5
Object.new.instance_eval "bar = 3; p local_variables, eval('local_variables'), eval('s = Rubinius::VariableScope.of_sender; [s.method, s.method.local_names, s.locals,s.parent]'), eval('bar'), eval('foo'), (s = Rubinius::VariableScope.of_sender; [s.method, s.method.local_names, s.parent])"
puts "------------"
Object.new.instance_eval { eval("bar = 3"); p local_variables, (s = Rubinius::VariableScope.of_sender; ['m', s.method, 'mln', s.method.local_names, 'sl', s.locals, 'sp', s.parent]), eval('bar'), eval('foo')}
p local_variables, eval("bar"), eval("foo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment