From: Robert Klemme Date: 2008-04-22T16:26:38+09:00 Subject: Re: A couple of questions regarding class design 2008/4/22, Simon Krahnke : > * Robert Klemme (2008-04-21) schrieb: > > > > The return value of #initialize is ignored - always. > > > Pardon? > > ,---- > | #!/usr/bin/env ruby > | > | class Eins > | def initialize > | 1 > | end > | > | def to_s > | initialize.to_s > | end > | end > | > | eins = Eins.new > | puts eins.to_s > `---- > > Of course prints "1". > > You probably mean that Object::new ignores the return value of > #initialize. Correct. Hehe, it never occurred to me to invoke #initialize as ordinary method but I do see the point now. Thanks! Kind regards robert -- use.inject do |as, often| as.you_can - without end