Project

General

Profile

Bug #10586

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

In the following code, function returns nil in eval(). 
 Getting rid of the last line, it returns 1 as we expect. 

 ~~~ruby 
 ------------------ 
 def foo; 1; end 
 p foo #=> 1 
 eval 'p foo' #=> nil (NG,expect=1) 
 foo=1 #<- bug trigger 
 ~~~ ------------------ 

Back