Hi,
In message "[ruby-talk:15454] Re: RCR: #const_name_is"
on 01/05/21, Mathieu Bouchard <matju / sympatico.ca> writes:
|First of all, pop up irb and try this:
|
|x = Class.new #==> #<Class 0lx4020d7f4>
|Foo=x #==> Foo
|x #==> Foo
|
|Obviously, Ruby does it "behind the scenes". Therefore it is useful.
|Therefore it is worth making available to everybody. This should be a
|sufficient rationale by itself.
Well, in this case, Module#to_s (or more precisely find_class_path()
function in variable.c) do this job. It searches class hierarchy from
Object upon invocation.
I don't really like the idea of active assignment like this.
matz.