From: Rick DeNatale Date: 2007-03-02T06:23:00+09:00 Subject: Re: Why does String have to_str and Integer have to_int? On 3/1/07, tsela.cg@gmail.com wrote: > On Mar 1, 8:49 pm, Eric Hodel wrote: > > > > Or > > > > #to_s means an object *has a* String representation > > > > and > > > > #to_str means on object *is a* String representation > > Great description! Thank you for summing up so well what I was trying > to say. I'm not good at catchy descriptions. Yes it's catchy, but Is Exception really a string representation? While the distinction here seems like it should be essential, it appears to be somewhat accidental. Some of these things seem to be to distinguish things which the implementation wants rather than something inherent. It reminds me of the discussion some time ago of the new to_splat method as another analog of to_a and to_ary. I never thought that there was a consensus as to which objects should implement to_splat. I hope this doesn't seem too harsh, it's really intended as an observation rather than a criticism. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/