まあ、変わりまくっているのはそうなんですが、atig が 2.0.0 で動かないのはなんでだろうと調べていたら protected なメソッドに対する respond_to? の挙動が変わっていた。
class A
def initialize
p respond_to?(:foo)
p respond_to?(:foo, true)
end
protected
def foo
end
end
A.new
この結果は以下の通り
% ruby -v respond_to.rb
ruby 1.9.3p375 (2013-01-18 revision 38876) [x86_64-darwin12.2.1]
true
true
% ruby -v respond_to.rb
ruby 2.0.0dev (2013-01-27 trunk 38955) [x86_64-darwin12.2.1]
false
true
1.9.3p375 だと両方とも true になるのに対して、2.0.0r38955 だと後者の respond_to? の第二引数を private なメソッドを検出する時と同じように true にした場合のみ true になった。
これ、結構影響範囲が大きそうな気がするけど大丈夫かなあ。後で bugs.ruby-lang.org 送り。