Issue #3773 has been updated by Thomas Sawyer.


I agree and I have another objection to add.

(c) A constant name is just a reference to an object.

That is to say, like any variable name, the object does not know it has been assigned it. If someone did C::D = A::B, then what would C::D.parent be? 

However my objection also argues against having Module#name at all. So perhaps for modules their is a necessary exception? Actually, this is partly why I bring up this suggested feature --to better understand why modules even know their names in the first place.

As for objection (a) I have seen other suggestions: enclosing_module, enclosure, container, namespace, enclosing_namespace, modspace, etc.

For objection (c), that's a good point. nil would be a better return value in that case.

							trans.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/3773

----------------------------------------
http://redmine.ruby-lang.org