Project

General

Profile

Actions

Feature #15921

closed

R-assign (rightward-assignment) operator

Added by nobu (Nobuyoshi Nakada) over 5 years ago. Updated almost 4 years ago.

Status:
Closed
Target version:
-
[ruby-core:93126]

Description

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


Related issues 2 (0 open2 closed)

Related to Ruby master - Feature #15799: pipeline operatorClosedActions
Related to Ruby master - Misc #16802: Prefer use of RHS assigment in documentationClosedioquatix (Samuel Williams)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0