Constant lookup limitation in Ruby
⚡ ruby CONSTANT.rb
CONSTANT.rb:3:in `showConstant': uninitialized constant Foo::CONSTANT (NameError)
from CONSTANT.rb:10:in `<main>'
class Foo
def self.showConstant
puts CONSTANT
end
end
class SubFoo < Foo
CONSTANT='SubFoo string'
end
SubFoo.showConstant