[#4567] Re: What's the biggest Ruby development? — Aleksi Niemel<aleksi.niemela@...>

Dave said:

18 messages 2000/08/23
[#4568] Q's on Marshal — Robert Feldt <feldt@...> 2000/08/23

[#4580] RubyUnit testcase run for different init params? — Robert Feldt <feldt@...> 2000/08/25

[#4584] Re: RubyUnit testcase run for different init params? — Dave Thomas <Dave@...> 2000/08/25

Robert Feldt <feldt@ce.chalmers.se> writes:

[#4623] Re: RubyUnit testcase run for different init params? — Robert Feldt <feldt@...> 2000/08/28

On Sat, 26 Aug 2000, Dave Thomas wrote:

[#4652] Andy and Dave's European Tour 2000 — Dave Thomas <Dave@...>

24 messages 2000/08/30
[#4653] Re: Andy and Dave's European Tour 2000 — matz@... (Yukihiro Matsumoto) 2000/08/30

Hi,

[#4657] Ruby tutorials for newbie — Kevin Liang <kevin@...> 2000/08/30

Hi,

[ruby-talk:4620] Re: Object#inspect

From: matz@... (Yukihiro Matsumoto)
Date: 2000-08-28 06:07:53 UTC
List: ruby-talk #4620
Hi,

In message "[ruby-talk:4612] Object#inspect"
    on 00/08/28, Mathieu Bouchard <matju@hbesoftware.com> writes:

|A suggestion regarding Object#inspect:
|
|I feel that the Object#inspect feature should be unfolded into several
|procedures. Currently the code for inspect seems to be mostly in the Array
|and Hash classes/files, and the entry point seems to be only the
|Object#inspect method. This seems bad for those trying to implement
|containers. Also this is bad for when you don't want to show certain
|fields in an inspect.

Hmm, I think inspect is an inspect is an inspect. 

Currently, we have to_s the standard stringify method, inspect the
debugging stringify method.  It's possible to have several other
methods, for example, one to generate eval reproducing string.

If you need your fancy stringify method, you can define it by
yourself.  If it's good enough, I'd love to add new method to the core
in the future version.

							matz.

In This Thread

Prev Next