[#77789] [Ruby trunk Feature#12012] Add Boolean method — prodis@...
Issue #12012 has been updated by Fernando Hamasaki de Amorim.
4 messages
2016/10/27
[ruby-core:77512] [Ruby trunk Bug#12669] syntax error at assinments of command
From:
whitequark@...
Date:
2016-10-07 10:08:39 UTC
List:
ruby-core #77512
Issue #12669 has been updated by whitequark *.
Will this change be backported?
----------------------------------------
Bug #12669: syntax error at assinments of command
https://bugs.ruby-lang.org/issues/12669#change-60775
* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v:
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Related to #12402, I found other kind inconsistencies.
simple assignment and op assign of `command` cause syntax error,
while simple assignments don't.
```
$ ruby -ce 'a = b = raise "x"'
Syntax OK
```
```
$ ruby -ce 'a = b += raise "x"'
-e:1: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
a = b += raise "x"
^
```
```
$ ruby -ce 'a += b = raise "x"'
-e:1: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
a += b = raise "x"
^
```
```
$ ruby -ce 'a += b += raise "x"'
-e:1: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
a += b += raise "x"
^
```
https://github.com/ruby/ruby/compare/trunk...nobu:chained-rhs
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>