Set#include? の挙動が 1.8.6 までと 1.8.7 以降で異なる


#1

okkez e$B$G$9!#e(B
e$B$k$j$^$N%A%1%C%H$r@0M}$7$F$$$?$i$h$/$o$+$i$J$/$J$C$?$N$G65$($F$$$?$@$1$k$H=u$+$j$^$9!#e(B
http://redmine.ruby-lang.org/issues/show/82

e$B0J2<$N%9%/%j%W%H$N<B9T7k2L$,e(B 1.8.6 e$B$^$G$He(B 1.8.7
e$B0J9_$G0[$J$j$^$9!#e(B
1.8.6 e$B$^$G$OA4$Fe(B true e$B$G$9$,e(B 1.8.7 e$B0J9_$Oe(B false, true,
false e$B$K$J$j$^$9!#e(B
e$B$3$N$h$&$J7k2L$K$J$C$F$$$kM}M3$H!"$3$N5sF0$,@5$7$$$N$+$I$&$+$,CN$j$?$$$G$9!#e(B
e$B$h$m$7$/$*4j$$$7$^$9!#e(B

require set

s = Set.new
s << s
p s.include?(s)
s1 = Set.new
s2 = Set.new
s1 << s2
p s1.include?(s2)
s2 << s1
p s2.include?(s1)