From: Yukihiro Matsumoto Date: 2012-02-28T09:44:34+09:00 Subject: [ruby-core:42986] [ruby-trunk - Bug #6097][Rejected] Weird constant behavior during inheritance... Issue #6097 has been updated by Yukihiro Matsumoto. Status changed from Open to Rejected Learn Ruby-way, please. ---------------------------------------- Bug #6097: Weird constant behavior during inheritance... https://bugs.ruby-lang.org/issues/6097 Author: Denis de Bernardy Status: Rejected Priority: Normal Assignee: Category: Target version: ruby -v: 1.9.3 >> 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? -- http://bugs.ruby-lang.org/