Project

General

Profile

Actions

Feature #12240

closed

circle number arguments

Added by nobu (Nobuyoshi Nakada) about 6 years ago. Updated about 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:74761]

Description

Often improvements about implicit block argument have been proposed, but in vain.

Such as:

[[1, 2], [3, 4]].map {|a1, a2| a1+a2} #=> [3, 7]

to

[[1, 2], [3, 4]].map {_1+_2}

Now, we (ko1 and nobu) found and propose the perfect solution.

[[1, 2], [3, 4]].map {+}

.. denote the arguments upto 20.

https://github.com/ruby/ruby/compare/trunk...nobu:feature/number-arg


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #15741: Ordinal parametersRejectedActions
Actions

Also available in: Atom PDF