A long time ago I found a bug in Ruby core. If you’re on any
p version of
1.9.3, you’re affected by this.
The “arity” of a function is the number of arguments it accepts.
ruby respects this definition if the method only has required arguments. If
there are optional arguments (ex.
arg=:arg), it should return -n-1 where
n is the number of required arguments.