From: Tony Arcieri Date: 2008-03-30T03:08:26+09:00 Subject: What's going on here? (weird Ruby 1.9 incompatibility) ------=_Part_14911_31493719.1206814103261 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline class A def a 'yay' end end class B def initialize(&meth) class << self; self; end.__send__(:define_method, :b, &meth) end end b = B.new &A.new.method(:a) p b.b Ruby 1.8 prints: "yay" Ruby 1.9 complains (on the p b.b line): 14:in `
': wrong number of arguments (1 for 0) (ArgumentError) -- Tony Arcieri medioh.com ------=_Part_14911_31493719.1206814103261--