[#100689] [Ruby master Feature#17303] Make webrick to bundled gems or remove from stdlib — hsbt@...
Issue #17303 has been reported by hsbt (Hiroshi SHIBATA).
11 messages
2020/11/02
[#100852] [Ruby master Feature#17326] Add Kernel#must! to the standard library — zimmerman.jake@...
Issue #17326 has been reported by jez (Jake Zimmerman).
24 messages
2020/11/14
[#100930] [Ruby master Feature#17333] Enumerable#many? — masafumi.o1988@...
Issue #17333 has been reported by okuramasafumi (Masafumi OKURA).
10 messages
2020/11/18
[#101071] [Ruby master Feature#17342] Hash#fetch_set — hunter_spawn@...
Issue #17342 has been reported by MaxLap (Maxime Lapointe).
26 messages
2020/11/25
[ruby-core:100790] [Ruby master Feature#17315] Hash #transform
From:
marcandre-ruby-core@...
Date:
2020-11-11 16:04:31 UTC
List:
ruby-core #100790
Issue #17315 has been updated by marcandre (Marc-Andre Lafortune).
I didn't suggest anything, as I don't see a good name, and I don't see the appeal of this method:
- it can not be more efficient than `update` + `to_h`
- there's not a frequent usecase that I know of
- seems like avoidable mutation
- `to_h!` would be strange (conversion + mutation...?)
----------------------------------------
Feature #17315: Hash #transform
https://bugs.ruby-lang.org/issues/17315#change-88434
* Author: dsisnero (Dominic Sisneros)
* Status: Open
* Priority: Normal
----------------------------------------
Add new methods to `transform` or `transform!` both the keys and the values of a hash.
#7793
```ruby
h = {'name' => 'dominic ', 'email' => 'dominic.mail.com '}
h.transform!{|k,v| [k.to_sym, v.strip]}
h # => {name: 'dominic', email: 'dominic.mail.com'}
```
--
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>