From: Marc-Andre Lafortune Date: 2009-10-14T22:49:49+09:00 Subject: [ruby-core:26090] [Bug #2212] Using a Lambda with Inappropriate Arity for Hash#default_proc= Issue #2212 has been updated by Marc-Andre Lafortune. Assigned to set to Yukihiro Matsumoto There are other cases where Ruby C code calls user code. In particular with the new respond_to_missing? Example: class A def respond_to_missing?(method, private) true end #.... end A.new.method(:foo) # ==> valid method A.new.respond_to?(:foo) # ==> ArgumentError: wrong number of arguments (1 for 2) from (irb):1:in `respond_to?' Although it's difficult to make an error when defining <=>, #sort and Comparable can give strange errors too if <=> has arity 0. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2212 ---------------------------------------- http://redmine.ruby-lang.org