1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
puts RUBY_VERSION class A def <<(n) end end class B def <<(n) return "not self" end end a = A.new p a << "dummy" b = B.new p b << "dummy"
1 2 3
1.8.6 nil "not self"