Charles Mills wrote:
> On Nov 30, 2004, at 8:15 PM, trans. (T. Onoma) wrote:
> 
>> On Tuesday 30 November 2004 12:07 pm, Charles Mills wrote:
>> | may be useful to define inspect something like the following:
>> | ###
>> | def inspect()
>> |    "#<#{self.class}: #{@very_important_ivar}>"
>> | end
>> | ###
>> | Opinions may differ though...
>>
>> Indeed. I like the idea that #inspect produce a string that will 
>> produce an
>> equivalent object when passed through #eval. This already works for 
>> literal
>> forms like Array.
>>
> 
> like:
> my_instance.inspect #=> "MyClass.new(10,11,12,'ducks')"
> 
> not sure if I like that ;)

It's an interesting idea, but I wouldn't favor using #inspect
for that.


Hal