[#97678] [Ruby master Feature#16752] :private param for const_set — bughitgithub@...
Issue #16752 has been reported by bughit (bug hit).
5 messages
2020/04/02
[ruby-core:97982] [Ruby master Feature#15921] R-assign (rightward-assignment) operator
From:
zverok.offline@...
Date:
2020-04-20 17:18:59 UTC
List:
ruby-core #97982
Issue #15921 has been updated by zverok (Victor Shepelev).
In current head, it is so:
```ruby
x1 = 5 + 3 => y1
p [x1, y1] # [8, 8]
5 + 3 => x2 => y2
p [x2, y2] # [8, 8]
*[1, 2, 3] => x3, y3
# ^ syntax error, unexpected =>, expecting '.' or &. or :: or '['
[1, 2, 3] => x4, y4
p [x4, y4] # => [1, 2]
```
That mostly makes sense to me (except for case 3, which seems to be "intuitively possible").
----------------------------------------
Feature #15921: R-assign (rightward-assignment) operator
https://bugs.ruby-lang.org/issues/15921#change-85211
* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
From https://bugs.ruby-lang.org/issues/15799#change-78465, proposal of the rightward-assignment operator by `=>`.
```
$ ./ruby -v -e '(1..).lazy.map {|x| x*2} => x' -e 'p x.first(10)'
ruby 2.7.0dev (2019-06-12T06:32:32Z feature/rassgn-assoc c928f06b79) [x86_64-darwin18]
last_commit=Rightward-assign by ASSOC
[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
```
https://github.com/nobu/ruby/tree/feature/rassgn-assoc
--
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>