From: Paul Brannan Date: 2001-10-30T22:48:00+09:00 Subject: [ruby-talk:23842] Re: ref. constructors and new (was: Re: class Foo does not call Class.new?) On Tue, 30 Oct 2001, Yukihiro Matsumoto wrote: > But things are not simple as they appear. Suppose we call String.new > for string literals, > > def String.new(str) > StringSubclass.new(str) > end > > would cause infinite loop, and I don't think there's no easy work > around for it. When would this be useful? If the base class implementation depends on the implementation of the derived class, then I question whether this is really a good relationship. Perhaps the pimpl idiom would be more useful in this case? Paul