From: twifkak@... Date: 2005-07-07T09:00:07+09:00 Subject: Re: Inheriting Array and slice() behaviour > |Like the OP, I think it's weird and special-cased to have #slice > |magically return something with the receiver's class. Especially since > |the return value is going to be broken (not initialized) except in > |trivial cases. > > What if it can be initialized properly? True... Array has a "copy constructor" (Array.new can take another Array), so you could call klass.new(theNewSubArray) unless klass == Array, instead of just massaging it into a klass... 1. I might be missing the point. I often do. 2. I don't have a strong opinion on the matter, though I do see the benefit of making this work better. It's all about "lowering the barrier to entry" to extending the core classes. (See http://onestepback.org/index.cgi/Tech/Ruby/ThinkingInRuby.red for a vaguely related, and much more eloquent, example of what I'm talking about.) 3. Sorry! I'll stop bothering you now. Devin