From: Robert Feldt Date: 2001-11-11T18:43:33+09:00 Subject: [ruby-talk:24867] Re: Help needed on subclassing On Sun, 11 Nov 2001, Aristarkh A Zagorodnikov wrote: > class T > def initialize(a, b, c) > ............ > end > end > > class S < T > def self.new(c) > super -12, "nothing more than a test string", c > end > end > Yes, correct semantics so far. > class M > def [](arg) > S.new 47 > end > end > But here I need to create S anew each time since the arg to [] defines different subclasses of T. I need a kind of partial evaluation, one could say. So no nice solution so far. Please post if you've got other ideas. Regards, /Robert