Brian Candler wrote: > On Sat, May 31, 2003 at 01:06:49AM +0900, Rasputin wrote: > >>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. >> >> >>supports what you just said (although the 'synonym for' sentence is a >>bit misleading), but what else would you use to_s for but to >>print to stdout? > > > Interpolation into strings - "#{foo}" - uses to_s > > Regards, > > Brian. > hmm... it seems to me that the real question is this: why have both to_s and to_str when the return value of them should at all concievable (to me at least) times be the same? -- dc -e 4dd*od3*dddn1-89danrn10-dan3+ann6*dan*2*an13dn1+dn2-dn3+5*ddan2/9+an13nap