Bug #16640
closed
Ooo just found https://bugs.ruby-lang.org/issues/9520. I kind of get the argument to keep it consistent with other procs, but this is still a special case within block types, and it will fail if you call it without an argument.
- Subject changed from Symbol#to_proc has incorrect arity to Symbol#to_proc reports -1 for arity
#9250 was closed with the reason
The proc created by Symbol#to_proc is not a lambda, but a proc
But in #16260, it was discussed that Symbol#to_proc
behaves more like lambda, and so hopefully all of its introspection methods (#lambda?
, #arity
, #parameters
) will be fixed.
Actually this can be closed, as it doesn't make sense for arity > 1.
- Description updated (diff)
- Status changed from Open to Rejected
The arity should actually be -2
which means 1 required arguments + any number of optional arguments.
- Status changed from Rejected to Open
- Status changed from Open to Closed
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0