From: matz@... (Yukihiro Matsumoto) Date: 2003-07-21T02:06:03+09:00 Subject: Re: Array and Hash to_s Hi, In message "Array and Hash to_s" on 03/07/20, Ben Giddings writes: |The main issue I have with these default to_s calls is that you seem to |lose a lot of information in the conversion. On the other hand, I |think the output from Array#inspect and Hash#inspect is great. It's |easily readable and contains all the info I want. Hmm, "to_s" means "stringify", that is making a string out of an object. It may or may not produce human readable output. |I'm having trouble coming up with a good example of where having a |reasonable output from some_random_object.to_s should be useful, but |how about this: I don't deny your desire. It is understandable. But: * I don't think we will change "to_s" behavior for compatibility reason. we may add a new string converter method for this purpose. * _you_ have to define your desire in detail; purpose, behavior, and corner cases, to show us it's generic enough to add in the core. Note you can add methods very easily even to the predefined classes in Ruby. matz.