From: Chris Morris Date: 2003-02-11T13:15:47+09:00 Subject: Re: inheriting from base classes > We're both very interested in hearing what people's views are on this. > Do you ever subclass String, Array, and Hash? Do you specifically > avoid doing so? Seems in practice, whenever I have a need to do something with a String, Hash or Array that isn't built-in, then I just tack it on, a la: class String def every_other_char # yada yada end end ... I don't ever subclass or wrap. And I love being able to do this -- this for me is one thing that makes Ruby fun. The risk with this, I suppose, is a name-clash with some other code that also defines every_other_char and does something a little different with it ... but the scope of my work is limited to probably not ever have this be an issue. Chris http://clabs.org