"Hal E. Fulton" <hal9000 / hypermetrics.com> wrote in message > The to_str method is used when an objects wants to "masquerade" > as a string. Meaning ? > One common difference is that the latter will > typically preserve all information, whereas the > former may only present enough to render the object > in a printable form. (At least I think I've seen > that distinction somewhere.) Forgive me for being dense. Can you please explain this more ? Maybe with an example ? All I have is a reference from PickAxe: ______________________________________________________ C:\> ri to_str This is a test 'ri'. Please report errors and omissions on http://www.rubygarden.org/ruby?RIOnePointEight ---------------------------------------------------------- String#to_str str.to_str -> str ------------------------------------------------------------------------ Synonym for String#to_s. to_str is used by methods such as String#concat to convert their arguments to a string. Unlike to_s, which is supported by almost all classes, to_str is normally implemented only by those classes that act like strings. Of the built-in classes, only Exception and String implement to_str. ______________________________________________________ TIA, --shanko