Feature #9909

why shouldn't constant lookup check the nesting of module's name

Added by First Last 12 months ago. Updated 12 months ago.

[ruby-core:62962]
Status:Open
Priority:Normal
Assignee:-

Description

module A
module B
end
end

above, B will have access to A's constants
but below, it won't

module A::B
end

is there a reason why the nesting of the name should not be part of the constant resolution algorithm?

when adding or reopening (deeply) nested modules/classes the :: syntax would be preferable, but you lose constant resolution

History

#1 Updated by George Koehler 12 months ago

See discussion in feature #6810.

Also available in: Atom PDF