On Thu, Aug 7, 2008 at 6:23 PM, Urabe Shyouhei <shyouhei / ruby-lang.org> wrote:
> Daniel Luz wrote:
>>> It's not used purposefully. The script above assumes that every Ruby
>>> class has a valid Ruby name. It seems a fair assumption.
>>>
>>
>> Considering Module#name can be overridden and constants can be redefined, I
>> wouldn't rely too much on that assumption.

It's definitely a fragile assumption. Maybe there's a better way.

> And there are anonymous modules:
>
> % ruby -e'p Module.new.name'                                                                                                                  [2008/Aug/08(Fri) 10:16:55 JST][shyouhei][SZ92PS][pts/4][screen 2]
> ""

Right; the code above skips anonymous classes.

'fatal' is exceptional because it's a named constant, responds to name
like any other class, but cannot be referenced in Ruby using its name.

This edge case happens to affect this obscure code. I don't think it's
a real issue :)

jeremy