From: Jeremy Bopp Date: 2011-04-21T02:44:01+09:00 Subject: Re: anonymous closures with Proc,new, lambda and -> On 4/20/2011 10:18, Brian Candler wrote: > Michael Edgar wrote in post #993817: >> Proc >> doesn't implement #initialize, so it bubbles up to Object#initialize. >> Since Object#initialize just takes any number of arguments and ignores >> them, providing an argument to Proc.new doesn't raise. > > So I think the question becomes: why does Object#initialize accept any > number of arguments in 1.9? It doesn't in 1.8. It seems that it was a bit of an oversight when the change that implemented that feature was approved. This is the redmine issue that tracked the change: http://redmine.ruby-lang.org/issues/show/2451 Here is a discussion about it: http://www.ruby-forum.com/topic/330466 Apparently, the change was reverted for Ruby 1.9.3+. I haven't checked to confirm for myself yet. -Jeremy