Project

General

Profile

Feature #9909

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

Added by First Last over 2 years ago. Updated over 2 years ago.

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

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 [ruby-core:62972] Updated by George Koehler over 2 years ago

See discussion in feature #6810.

Also available in: Atom PDF