From: "David A. Black" Date: 2008-10-15T23:03:20+09:00 Subject: [ruby-core:19343] Yet another block semantic/syntax question 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 -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates!