F
FindSun
Hi, guys,
I am one of the chinese translators for "Programming Ruby 2nd". And
one reader in China reported that the 'next' call within the Proc obj
created by 'lambda' always returns nil, instead of the specified
value.
E.g., (the code snippets is from page 358)
pr = lambda {next 99}
puts pr.call
While, for the Proc obj created by Proc#new, it works fine.
Could you please have a look, why 1.8.5/6 changed to that way? Or it's
just a bug?
Regards,
I am one of the chinese translators for "Programming Ruby 2nd". And
one reader in China reported that the 'next' call within the Proc obj
created by 'lambda' always returns nil, instead of the specified
value.
E.g., (the code snippets is from page 358)
pr = lambda {next 99}
puts pr.call
While, for the Proc obj created by Proc#new, it works fine.
Could you please have a look, why 1.8.5/6 changed to that way? Or it's
just a bug?
Regards,