From: Daniel Schierbeck Date: 2006-05-13T06:40:24+09:00 Subject: Re: Newb question - object type tests? Daniel Schierbeck wrote: > Eric Hodel wrote: >> The to_xxx methods are used to convert an object that is an XXX >> representation into an XXX object when there is no inheritance >> relationship. > > No, the #to_x methods do that. Only objects that are "strings", but not > necessarily instances of String, should define #to_str. Reading it over again, I see what you mean. Yes, there are representations of objects, and those are what you're interested in. If you're going to perform some actions on a string, you can accept any object that responds to #to_str.