From: Ilmari Heikkinen Date: 2006-05-13T08:06:59+09:00 Subject: Re: YARV vs. lambda On 5/13/06, Eric Hodel wrote:> On May 12, 2006, at 11:59 AM, Ilmari Heikkinen wrote:>> > On 5/12/06, Victor Shepelev wrote:> >> Hi all.> >>> >> Somebody knows why YARV do this:> >>> >> l = lambda{|*arg| p arg}> >>> >> l[1] #prints 1 instead of [1]> >> l[2,3] #prints 2 instead of [2,3]> >> l[] #prints 0 instead of []> >> > Works here.. Try the SVN HEAD?>> How did you compile it?>> $ ruby-yarv -ve 'lambda { |*a| p a }[2,3]'> ruby 2.0.0 (Base: Ruby 1.9.0 2006-04-08) [powerpc-darwin8.6.0]> YARVCore 0.4.0 Rev: 497 (2006-05-07) [opts: ]> 2> oh, looks like i was using an old revision kig@bright:~/code/yarv> ./ruby-yarv -ve 'lambda{|*a| p a}[2,3]'ruby 2.0.0 (Base: Ruby 1.9.0 2006-02-14) [i686-linux]YARVCore 0.4.0 Rev: 482 (2006-03-08) [opts: ][2, 3] kig@bright:~/code/yarv> ./ruby -ve 'lambda{|*a| p a}[2,3]'ruby 2.0.0 (Base: Ruby 1.9.0 2006-04-08) [i686-linux]YARVCore 0.4.0 Rev: 497 (2006-05-07) [opts: ]2 sorry for the confusion