[#85940] [Ruby trunk Bug#14578] Forking a child process inside of a mutex crashes the ruby interpreter — ben.govero@...
Issue #14578 has been reported by bengovero (Ben Govero).
3 messages
2018/03/05
[#86205] [Ruby trunk Feature#14618] Add display width method to String for CLI — aycabta@...
SXNzdWUgIzE0NjE4IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGF5Y2FidGEgKGF5Y2FidGEgLikuCgot
3 messages
2018/03/19
[#86366] Re: [ruby-cvs:70102] usa:r63008 (trunk): get rid of test error/failure on Windows introduced at r62955 — Eric Wong <normalperson@...>
usa@ruby-lang.org wrote:
3 messages
2018/03/28
[ruby-core:86045] [Ruby trunk Feature#14579] Hash value omission
From:
eregontp@...
Date:
2018-03-08 11:04:42 UTC
List:
ruby-core #86045
Issue #14579 has been updated by Eregon (Benoit Daloze).
I find this syntax very confusing.
The the occurrences of `password:` above means two very different things (required kwarg and auto-hash creation).
For
~~~ruby
x = 1
y = 2
h = {x:, y:}
~~~
it looks to me like the values are missing.
I'd prefer a syntax which is different than "key syntax without value", and refers to the variable name used for the value more clearly, like:
~~~ruby
x = 1
y = 2
h = {x, y}
~~~
That would also work for the second case like so:
~~~ruby
def login(username: ENV["USER"], password:)
p({username, password})
end
~~~
----------------------------------------
Feature #14579: Hash value omission
https://bugs.ruby-lang.org/issues/14579#change-70909
* Author: shugo (Shugo Maeda)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
How about to allow value omission in Hash literals:
```ruby
x = 1
y = 2
h = {x:, y:}
p h #=> {:x=>1, :y=>2}
```
And in keyword arguments:
```ruby
def login(username: ENV["USER"], password:)
p(username:, password:)
end
login(password: "xxx") #=> {:username=>"shugo", :password=>"xxx"}
```
---Files--------------------------------
hash_value_omission.diff (619 Bytes)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>