Hi,
In message "Re: [ruby-core:32038] [Ruby 1.9-Feature#3773] Module#parent"
on Fri, 3 Sep 2010 20:03:34 +0900, Thomas Sawyer <redmine / ruby-lang.org> writes:
|Issue #3773 has been updated by Thomas Sawyer.
|
|
|"For objection (c), that's a good point. nil would be a better return value in that case."
|
|I meant, "objection (b)".
|
|matz, do you have a preference for a name?
As pointed by objection (c), a constant name is just a reference to
a module/class object. For example, the following code creates two
references to the A::B module:
module A
module B
end
end
C = A::B
Although a module records the first reference name, just for
convenience, having a method to retrieve "a parent of the primary
reference" makes me feel bit weird.
If you show me a real use-case, I might feel different.
matz.