"Pit Capitain" <pit / capitain.de> schrieb im Newsbeitrag
news:41F9E97C.2030006 / capitain.de...
> Trans schrieb:
> > (...) though I would like to figure
> > out how to copy classes and give them a name, instead of them
appearing
> > as numbers on #inspect.

I would not do this.  IMHO even from a conceptual point of view you rather
want instances and not classes.  Did you consider my remark about parsing
context?

>    c = String.dup
>
>    def c.to_s
>      "MySpecialString"
>    end

I guess that's not the same as there is some magic involved with class
names:

>> c = Class.new
=> #<Class:0x1018ab00>
>> c.name
=> ""
>> Foo = c
=> Foo
>> c.name
=> "Foo"
>> Foo.name
=> "Foo"
>> Bar = c
=> Foo
>> Bar.name
=> "Foo"
>> c.name
=> "Foo"

Kind regards

    robert