From: Jeff Date: 2008-10-17T04:54:58+09:00 Subject: [ruby-core:19359] Re: Yet another block semantic/syntax question On Oct 15, 9:03�am, "David A. Black" wrote: > Hi -- > > I just want to make sure I'm right that this is what happens, and that > it's supposed to happen: > > >> �pr = Proc.new {|a,b=1| p a, b } > > => #>> � pr.call(10,20) > > 10 > 1 > => [10, 1] > > >> RUBY_RELEASE_DATE > => "2008-10-15" > >> RUBY_VERSION > > => "1.9.0" > > In other words, Proc.new accepts the method-argument syntax, but does > not use method-argument semantics (it sets b unconditionally to 1). > (lambda uses method-arg semantics all the way in similar cases.) > > David > > -- I hope that's not intentional :-) Sounds like a bug to me. Jeff purpleworkshops.com