[#66678] [ruby-trunk - Feature #10481] Add "if" and "unless" clauses to rescue statements — alex@...
Issue #10481 has been updated by Alex Boyd.
3 messages
2014/12/04
[#66762] Re: [ruby-changes:36667] normal:r48748 (trunk): struct: avoid all O(n) behavior on access — Tanaka Akira <akr@...>
2014-12-10 0:44 GMT+09:00 normal <[email protected]>:
3 messages
2014/12/10
[#66851] [ruby-trunk - Feature #10585] struct: speedup struct.attr = v for first 10 attributes and struct[:attr] for big structs — funny.falcon@...
Issue #10585 has been updated by Yura Sokolov.
3 messages
2014/12/15
[#67126] Ruby 2.2.0 Released — "NARUSE, Yui" <naruse@...>
We are pleased to announce the release of Ruby 2.2.0.
8 messages
2014/12/25
[#67128] Re: Ruby 2.2.0 Released
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2014/12/25
I can't install it in any of our Ubuntu servers using rbenv:
[#67129] Re: Ruby 2.2.0 Released
— SHIBATA Hiroshi <shibata.hiroshi@...>
2014/12/25
> I can't install it in any of our Ubuntu servers using rbenv:
[ruby-core:66937] [ruby-trunk - Bug #10450] multiple assignment in conditional
From:
duerst@...
Date:
2014-12-18 06:12:32 UTC
List:
ruby-core #66937
Issue #10450 has been updated by Martin D=C3=BCrst.
bug hit wrote:
> Yusuke Endoh wrote:
> > I think that the restriction is no longer meaningful, but it does not m=
ean that this is a bug. Whatever the reason is, the behavior has been the =
spec. It is not harmful. It is trivial to work around. So I consider thi=
s ticket as a feature request.
> >=20
> > I can reopen this ticket, but it has many noises and too long. I also =
recommend you to open a new ticket to feature request tracker.
> If you can reopen, then please do, I think it's better not to have two ti=
ckets for the same issue. I disagree that this is a feature.
It would be helpful if you could defer the triage into bugs and features to=
people such as Yusuke who have a lot of experience with how Ruby developme=
nt works. Also, while it's better to not have two tickets for the same issu=
e, it's better to have a new ticket because, as we had to find out, the cur=
rent ticket mixes up two issues (allowing multiple assignment in conditions=
and removing parentheses), is confusing, and has accumulated a lot of dust.
----------------------------------------
Bug #10450: multiple assignment in conditional
https://bugs.ruby-lang.org/issues/10450#change-50481
* Author: bug hit
* Status: Rejected
* Priority: Normal
* Assignee:=20
* Category:=20
* Target version:=20
* ruby -v: ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
multiple assignment is an expression whose value can be truthy (array) or f=
alsy (nil, false), so why is there a restriction on its use in conditionals=
? A warning perhaps is justified, but a syntax error, why?
irb(main):001:0> if a, b =3D nil then 1 else 0 end
SyntaxError: (irb):1: syntax error, unexpected ',', expecting keyword_then =
or ';' or '\n'
if a, b =3D nil then 1 else 0 end
^
(irb):1: syntax error, unexpected keyword_then, expecting end-of-input
if a, b =3D nil then 1 else 0 end
^
from /home/alex/.rbenv/versions/2.1.4/bin/irb:11:in `<main>'
irb(main):002:0> if (a, b =3D nil) then 1 else 0 end
SyntaxError: (irb):2: multiple assignment in conditional
from /home/alex/.rbenv/versions/2.1.4/bin/irb:11:in `<main>'
irb(main):003:0> (a, b =3D nil) ? 1 : 0
SyntaxError: (irb):3: multiple assignment in conditional
from /home/alex/.rbenv/versions/2.1.4/bin/irb:11:in `<main>'
irb(main):004:0> (a, b =3D nil)
=3D> nil
--=20
https://bugs.ruby-lang.org/