From: "Berger, Daniel" Date: 2007-06-29T06:42:49+09:00 Subject: Re: Proc initialize method not called under certain circumstances > -----Original Message----- > From: John Lam (CLR) [mailto:jflam@microsoft.com] > Sent: Thursday, June 28, 2007 3:25 PM > To: ruby-core@ruby-lang.org > 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? Correct. Unfortunately. To wit: class String def initialize(str) puts "Hello John!" str end end s1 = String.new('yo1') 'Hello John!' => 'yo1' s2 = 'yo2' => 'yo2' Personally, I've never liked it. I don't know what Ruby 2 will do. Regards, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.