class A
CONST = 'A'
def initialize
puts self.class::CONST
end
end
class B < A
CONST = 'B'
end
A.new # => 'A'
B.new # => 'B'
class A
CONST = 'A'
def initialize
puts self.class::CONST
end
end
class B < A
CONST = 'B'
end
A.new # => 'A'
B.new # => 'B'