Comment on Ruby's not readyparentComments−brlewis18yCould you give a more complete example? I'm getting sane behavior in Ruby 1.8.6: irb(main):010:0> f = lambda { i = 100; x = 0; [1,2,3].each { |i| x += i }; x} => #<Proc:0x05011b34@(irb):10> irb(main):011:0> f.call() => 6−raganwald18yyou missed the fun: macbook-pro-2:trunk raganwald$ ruby -v => ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1] macbook-pro-2:trunk raganwald$ irb irb(main):001:0> lambda { i = 100; x = 0; [1,2,3].each { |i| x += i }; i }.call => 3
Comments
Could you give a more complete example? I'm getting sane behavior in Ruby 1.8.6:
you missed the fun: