Project

General

Profile

Actions

Bug #9520

closed

Arity of a Proc obtained by Symbol#to_proc

Added by prijutme4ty (Ilya Vorontsov) almost 11 years ago. Updated almost 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:60752]

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?

Actions

Also available in: Atom PDF

Like0
Like0