From: Michael Edgar Date: 2011-04-20T03:51:09+09:00 Subject: Re: anonymous closures with Proc,new, lambda and -> Interesting. The default allocation behavior method is removed, and Class.new is overridden, which uses custom allocation and forwards arguments to #initialize - just like normal Class.new. Except 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. It seems adding an empty, 0-arg #initialize method to Proc doesn't really lose anything here, and would catch mistakes. The only tiny downside would be a miniscule slow down on explicit calls to Proc.new... which I think most Rubyists can live with. Michael Edgar adgar@carboni.ca http://carboni.ca/ On Apr 19, 2011, at 2:26 PM, Steve Klabnik wrote: > Doesn't look like it's really used for anything: > https://github.com/ruby/ruby/blob/trunk/proc.c#L448