Actions
Bug #6097
closedWeird constant behavior during inheritance...
Description
class Parent
class Child
def foo
end
end
end
=> nil
class Test < Parent
end
=> nil
Test.const_defined?(:Child)
=> true
class Test
class Child
def bar
end
end
end
=> nil
Test::Child.new.respond_to?(:bar)
=> true
Parent::Child.new.respond_to?(:bar)
=> false # true expected...
Obviously, testing the object_id shows that Parent::Child and Test::Child are not the same class, but is this to be expected?
Actions
Like0
Like0Like0