[ruby-dev:50304] [Backport187 Backport#1915][Closed] const_defined?の1.9との挙動の違いについて
From:
knu@...
Date:
2017-10-22 12:31:53 UTC
List:
ruby-dev #50304
Issue #1915 has been updated by knu (Akinori MUSHA).
Project changed from Ruby 1.8 to Backport187
Description updated
Status changed from Assigned to Closed
Closing this, Ruby 1.8.7 had gone EOL over three years ago.
----------------------------------------
Backport #1915: const_defined?の1.9との挙動の違いについて
https://bugs.ruby-lang.org/issues/1915#change-67517
* Author: matsuda (Akira Matsuda)
* Status: Closed
* Priority: Normal
* Assignee: knu (Akinori MUSHA)
----------------------------------------
=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
--
https://bugs.ruby-lang.org/