From: "John Lam (CLR)" Date: 2007-06-29T06:24:48+09:00 Subject: Re: Proc initialize method not called under certain circumstances So, is it correct to assume that for language constructs that create built-in types like Range, Array, Hash etc that user-defined initialize methods are never called? Thanks, -John -----Original Message----- From: MenTaLguY [mailto:mental@rydia.net] Sent: Thursday, June 28, 2007 1:50 PM To: ruby-core@ruby-lang.org Subject: Re: Proc initialize method not called under certain circumstances On Fri, 29 Jun 2007 05:43:14 +0900, "John Lam (CLR)" wrote: > Proc.new {} # prints "initialized" Here, the Proc object is created the normal way. > foo { } # prints nothing Here, no Proc is created (blocks are not reified as Proc objects unless necessary, i.e. by an &-argument). > lambda {} # prints nothing Here, the Proc object is being created "intrinsically", similar to how Array objects are created with [], bypassing the generic creation/initialization machinery. -mental