Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail From: Jeremy Bopp Newsgroups: comp.lang.ruby Subject: Re: anonymous closures with Proc,new, lambda and -> Date: Wed, 20 Apr 2011 12:44:01 -0500 Organization: Service de news de lacave.net Lines: 25 Message-ID: <4DAF1B58.1040607@bopp.net> References: <03b15245deb79f0148cf821c34a7ed41@ruby-forum.com> <9b174c2306ccb671f0cdd13f433067f9@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1303321664 17505 65.111.164.187 (20 Apr 2011 17:47:44 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Wed, 20 Apr 2011 17:47:44 +0000 (UTC) In-Reply-To: <9b174c2306ccb671f0cdd13f433067f9@ruby-forum.com> X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 381944 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <4DAF1B58.1040607@bopp.net> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3260 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