[#105450] [Ruby master Feature#18228] Add a `timeout` option to `IO.copy_stream` — "byroot (Jean Boussier)" <noreply@...>
SXNzdWUgIzE4MjI4IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGJ5cm9vdCAoSmVhbiBCb3Vzc2llciku
11 messages
2021/09/27
[ruby-core:105266] [Ruby master Feature#14579] Hash value omission
From:
"shugo (Shugo Maeda)" <noreply@...>
Date:
2021-09-15 10:08:26 UTC
List:
ruby-core #105266
Issue #14579 has been updated by shugo (Shugo Maeda).
duerst (Martin D=FCrst) wrote in #note-27:
> I don't think using `if` as the name of a local variable is a good idea, =
and I don't think the speed of bad ideas should concern us too much.
As zverok stated, a keyword such as `if` is used as a keyword argument (esp=
ecially on Rails?).
----------------------------------------
Feature #14579: Hash value omission
https://bugs.ruby-lang.org/issues/14579#change-93676
* Author: shugo (Shugo Maeda)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
----------------------------------------
How about to allow value omission in Hash literals:
```ruby
x =3D 1
y =3D 2
h =3D {x:, y:}
p h #=3D> {:x=3D>1, :y=3D>2}
```
And in keyword arguments:
```ruby
def login(username: ENV["USER"], password:)
p(username:, password:)
end
login(password: "xxx") #=3D> {:username=3D>"shugo", :password=3D>"xxx"}
```
---Files--------------------------------
hash_value_omission.diff (619 Bytes)
-- =
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>