Bug #8438

Kernel.eval can not Reliably Create new Variables

Added by Martin Vahi about 2 years ago. Updated 4 months ago.

[ruby-core:55141]
Status:Rejected
Priority:Normal
Assignee:-
ruby -v:ruby 2.0.0p195 (2013-05-14) [x86_64-linux] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

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

History

#1 Updated by Nobuyoshi Nakada about 2 years ago

  • Status changed from Open to Rejected

Local variables are determined at compile phase.

#2 Updated by Martin Vahi 4 months ago

Thank You for the answer, but as a response to Your answer
I change the current flaw report to a feature request.

Also available in: Atom PDF