Actions
Bug #10586
closedfunction wrongly returns nil in eval()
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p598 (2014-11-13) [x86_64-cygwin]
Backport:
Description
In the following code, function returns nil in eval().
Getting rid of the last line, it returns 1 as we expect.
def foo; 1; end
p foo #=> 1
eval 'p foo' #=> nil (NG,expect=1)
foo=1 #<- bug trigger
Files
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Description updated (diff)
- Status changed from Open to Rejected
foo
is a local variable.
Actions
Like0
Like0