Actions
Bug #9520
closedArity of a Proc obtained by Symbol#to_proc
Description
I'm not sure is it a bug, but I find this behavior wrong.
:to_s.to_proc.arity # => -1
but isn't :to_s.to_proc is the same as ->(x){x.to_s} whose arity is 1?
Updated by nobu (Nobuyoshi Nakada) almost 11 years ago
- Status changed from Open to Rejected
The proc
created by Symbol#to_proc
is not a lambda, but a proc, which accepts arbitrary number arguments.
Actions
Like0
Like0