[#92070] [Ruby trunk Feature#15667] Introduce malloc_trim(0) in full gc cycles — sam.saffron@...
Issue #15667 has been updated by sam.saffron (Sam Saffron).
3 messages
2019/04/01
[ruby-core:92078] [Ruby trunk Feature#12240] circle number arguments
From:
nobu@...
Date:
2019-04-01 05:36:04 UTC
List:
ruby-core #92078
Issue #12240 has been updated by nobu (Nobuyoshi Nakada).
As now we have `@1` and so on, revised and refined this patch.
https://github.com/nobu/ruby/pull/new/feature/circled_numparams
----------------------------------------
Feature #12240: circle number arguments
https://bugs.ruby-lang.org/issues/12240#change-77409
* Author: nobu (Nobuyoshi Nakada)
* Status: Rejected
* Priority: Normal
* Assignee: joke
* Target version:
----------------------------------------
Often improvements about implicit block argument have been proposed, but in vain.
Such as:
~~~ruby
[[1, 2], [3, 4]].map {|a1, a2| a1+a2} #=> [3, 7]
~~~
to
~~~ruby
[[1, 2], [3, 4]].map {_1+_2}
~~~
Now, we (ko1 and nobu) found and propose the *perfect* solution.
~~~ruby
[[1, 2], [3, 4]].map {①+②}
~~~
`①`..`⑳` denote the arguments upto 20.
https://github.com/ruby/ruby/compare/trunk...nobu:feature/number-arg
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>