ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:50962] [Ruby master Bug#17190] Not working multiple assignment by rightward assignment statement
@ 2020-09-25 19:41 yancya
  2020-09-28  0:17 ` [ruby-dev:50963] " shyouhei
  0 siblings, 1 reply; 2+ messages in thread
From: yancya @ 2020-09-25 19:41 UTC (permalink / raw)
  To: ruby-dev

Issue #17190 has been reported by yancya (Shinta Koyanagi).

----------------------------------------
Bug #17190: Not working multiple assignment by rightward assignment statement 
https://bugs.ruby-lang.org/issues/17190

* 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-dev:50963] [Ruby master Bug#17190] Not working multiple assignment by rightward assignment statement
  2020-09-25 19:41 [ruby-dev:50962] [Ruby master Bug#17190] Not working multiple assignment by rightward assignment statement yancya
@ 2020-09-28  0:17 ` shyouhei
  0 siblings, 0 replies; 2+ messages in thread
From: shyouhei @ 2020-09-28  0:17 UTC (permalink / raw)
  To: ruby-dev

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-28  0:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 19:41 [ruby-dev:50962] [Ruby master Bug#17190] Not working multiple assignment by rightward assignment statement yancya
2020-09-28  0:17 ` [ruby-dev:50963] " shyouhei

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).