From: Dave Thomas Date: 2001-10-29T10:54:00+09:00 Subject: [ruby-talk:23702] Re: ref. constructors and new (was: Re: class Foo does not call Class.new?) matz@ruby-lang.org (Yukihiro Matsumoto) writes: > Hi, > > In message "[ruby-talk:23680] Re: ref. constructors and new (was: Re: class Foo does not call Class.new?)" > on 01/10/28, David Alan Black writes: > > |OK... I guess that the [] and "" constructors still will not use > |"new"? I'm just wondering because if they did use new, I think I > |could make Ruby Behaviors a lot better :-) > > They won't (at least String won't). It will cause infinite loop. > > "abc" -> String.new("abc") -> String.new(String.new("abc")) ... But String.new("abc") would become String.new(aNewStringObject), wouldn't it? The literal only gets converted once. Dave