From: marcandre-ruby-core@... Date: 2020-06-10T04:34:41+00:00 Subject: [ruby-core:98700] [Ruby master Feature#16939] Alias _1 as _ for block numbered params Issue #16939 has been updated by marcandre (Marc-Andre Lafortune). All the examples I could find where `{|_| ...}`, which could be made compatible. I still wonder what valid code example could be incompatible. Was there such an example in the wild? ---------------------------------------- Feature #16939: Alias _1 as _ for block numbered params https://bugs.ruby-lang.org/issues/16939#change-86047 * Author: x3qt (Yury Polyakov) * Status: Closed * Priority: Normal ---------------------------------------- I propose to alias `_1` as `_` for block numbered params, so the following statements should be equal ��� ``` ruby [1,2,3].map { _1 ** 2 } [1,2,3].map { _ ** 2 } ``` There is an [anonymous function argument literal](https://clojure.org/reference/reader#_dispatch) in Clojure and it feels natural all the way, hope we can have the one too. -- https://bugs.ruby-lang.org/ Unsubscribe: