Matz says:
> 'inspect' is for human readable representation.  
> Probably we have to have either
> 
>   (a) `inspect' like method without length limit, which probably gives
>       eval reproducing string.
> 
>   (b) removing length limit from String#inspect.

I'd love to see inspecting to have some warp on it's evolution. Basically
these are the notes and ideas I currently have for it.

First, let's make it pretty print by default (retain some option for
backward compatibility).

So that instead of

  class Foo
    attr_accessor :foo, :bar, :zak
  end
  f = Foo.new
  f.foo = {[1,[2,3]] => [{1..3 => /abc/}, Object, Object.new]}
  b = Foo.new
  b.bar = [1,2,3]
  f.bar = b
  f.zak = f
  p f

outputting 

  #<Foo:0x4017a75c @zak=#<Foo:0x4017a75c ...>, @bar=#<Foo:0x4017a5cc 
   @bar=[1, 2, 3]>, @foo={[1, [2, 3]]=>[{1..3=>/abc/}, Object,
   #Object:0x4017a5e0>]}>

we would get

  #<Foo:0x4017a75c 
    @zak=#<Foo:0x4017a75c ...>, 
    @bar=#<Foo:0x4017a5cc @bar=[1, 2, 3]>, 
    @foo={[1, [2, 3]]=>[{1..3=>/abc/}, Object, #<Object:0x4017a5e0>]}
  >

The basic rule for newlines would be "if it fits on remaining line, print it
on one line, else split and indend on ivars and proper places on arrays and
hashes".

Some good XML form might be something to consider too:

  <object class="Foo" id="0x4017a75c">
    <ivar name="zak">
      <object class="Foo" id="0x4017a75c">
    </ivar>
    <ivar name="bar">
      <object class="Foo" id="0x4017a5cc">
        <ivar name="bar">
          <object class="Array" id="0x40404040">
            1, 2, 3
          </object>
        </ivar>
      </object>
    </ivar>
    ...

Here we start to go away from normal "inspecting" and start to approach
Marshalling. So maybe the XML version should be actually be part of standard
Marshalling module. It would be cool, useful and buzzword compliant. One
possible start for Marshalling adaption could be WDDX way
(http://www.wddx.org/SDK/2_Docs/UsingWDDX/Tutorial.html).

	- Aleksi