Project

General

Profile

Actions

Bug #8411

closed

Wrong value returned when arity called on a method created through define_method with default arguments

Added by JFlash (John Amicangelo) over 8 years ago. Updated about 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.3.0]
[ruby-core:55013]

Description

def foo(bizz=:bizz, baz=:baz, buzz=:buzz)
end

Object.send(:define_method, :bar) do |bizz=:bizz, baz=:baz, buzz=:buzz|
end

puts method(:foo).arity
puts method(:bar).arity

Expected:
-1
-1

Actual:
-1
0

Actions

Also available in: Atom PDF