From: Jamis Buck Date: 2003-12-15T01:22:55+09:00 Subject: Re: inplace assignment T. Onoma wrote: >But, I actually did find a better way to do it this morning, by redefining >MyClass#new to return a subclass of itself instead. Hmm..I forget, what kind >of design pattern is that? > > Sounds like a factory method to me. Is there one specifically about redefining a constructor to return a subclass? (Clever application of the pattern, BTW.) -- Jamis Buck jgb3@email.byu.edu ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'