- 1y ·
-
Public·
-
ruby.social
I'll write this up in more detail at some point, but in going over Pickaxe copyedits, I realized I left out a nuance about constant lookup, which is that if you define a module like this:
```
module Outer
CONST = “outer”
end
```
And then a class namespaced but without nesting references that constant:::
```
class Outer::Inner
def self.value = CONST
end
```
Ruby won't look in `Outer` for the constant value…