From: ts Date: 2005-09-28T22:09:58+09:00 Subject: Re: creating independent lambdas in loops >>>>> "M" == Michael Roth writes: M> Already tried. Doesn't work... :-\ moulon% cat b.rb #!/usr/bin/ruby a = [] [2, 3, 4, 5].each do |multi| a << lambda do |n| n * multi end end for mul in a puts mul.call(17) end moulon% moulon% ./b.rb 34 51 68 85 moulon% Guy Decoux