This project is closed and read-only.
Actions
Backport #1915
closedconst_defined?の1.9との挙動の違いについて
Backport #1915:
const_defined?の1.9との挙動の違いについて
Status:
Closed
Assignee:
Description
=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
Actions