From: Stefan Radomski Date: 2011-05-11T16:27:10+09:00 Subject: [ruby-dev:43518] [Ruby 1.8 - Backport #1915] const_defined?の1.9との挙動の違いについて Issue #1915 has been updated by Stefan Radomski. Hello, i have found that behavior in rubinius too. I fixed it, so that it worked like ruby 1.9, but broke the compatibility with 1.8. Will this be fixed in the next version of 1.8? ---------------------------------------- Backport #1915: const_defined?の1.9との挙動の違いについて http://redmine.ruby-lang.org/issues/1915 Author: Akira Matsuda Status: Assigned Priority: Normal Assignee: Akinori MUSHA Category: Target version: =begin 以下の場合に % cat const_defined.rb class Alpha class Beta; end end class Gamma < Alpha; end puts Gamma::const_get('Alpha') puts Gamma::const_defined?('Alpha') 1.8と1.9ではそれぞれこうなります。 % ruby18 -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9] % ruby18 const_defined.rb Alpha false % ruby19 -v ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9.7.0] % ruby19 const_defined.rb Alpha true 1.9から仕様が変更されたということなのかな、と思うのですが、これは1.8.xにバックポートされる予定はあるのでしょうか? =end -- http://redmine.ruby-lang.org