Bug #8438

Kernel.eval can not Reliably Create new Variables

Added by Martin Vahi almost 2 years ago. Updated almost 2 years ago.

ruby -v:ruby 2.0.0p195 (2013-05-14) [x86_64-linux] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN


Variables that are created by the Kernel.eval are deleted from the execution context before the method eval exits, despite the fact that the execution context that is fed to the Kernel.eval by a Binding instance is still in use.

That seriously hinders the use of reflection.

Demo resides in the attached flaw_demo.rb.

flaw_demo.rb Magnifier - The flaw_demo.rb contains the whole description of the flaw. (1.64 KB) Martin Vahi, 05/23/2013 03:40 PM


#1 Updated by Nobuyoshi Nakada almost 2 years ago

  • Status changed from Open to Rejected

Local variables are determined at compile phase.

Also available in: Atom PDF