From: shyouhei@ruby-lang.org
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50963] [Ruby master Bug#17190] Not working multiple assignment by rightward assignment statement
Date: Mon, 28 Sep 2020 00:17:07 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-87762.20200928001707.8965@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-17190.20200925194135.8965@ruby-lang.org>
Issue #17190 has been updated by shyouhei (Shyouhei Urabe).
You need parens.
```ruby
[42, 42] => a, b
```
----------------------------------------
Bug #17190: Not working multiple assignment by rightward assignment statement
https://bugs.ruby-lang.org/issues/17190#change-87762
* Author: yancya (Shinta Koyanagi)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.0preview1 (2020-09-25 master 0096d2b895) [x86_64-darwin19]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
For example. It is foo.rb
```rb
42, 42 => a, b
p a
p b
```
I expected it.
```sh
42
42
```
But, Real result.
```sh
hoge.rb:1: syntax error, unexpected ',', expecting end-of-input
42, 42 => a, b
```
Is this intentional?
--
https://bugs.ruby-lang.org/
prev parent reply other threads:[~2020-09-28 0:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 19:41 [ruby-dev:50962] " yancya
2020-09-28 0:17 ` shyouhei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-87762.20200928001707.8965@ruby-lang.org \
--to=shyouhei@ruby-lang.org \
--cc=ruby-dev@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).