[#76442] [Ruby trunk Feature#11741] Migrate Ruby to Git from Subversion — naruse@...
Issue #11741 has been updated by Yui NARUSE.
3 messages
2016/07/19
[#76515] [Ruby trunk Bug#12610] webrick: protect from httpoxy — nagachika00@...
Issue #12610 has been updated by Tomoyuki Chikanaga.
3 messages
2016/07/22
[ruby-core:76517] [Ruby trunk Feature#11818][Assigned] `Hash#compact`
From:
muraken@...
Date:
2016-07-22 03:06:14 UTC
List:
ruby-core #76517
Issue #11818 has been updated by Kenta Murata.
Status changed from Open to Assigned
Assignee set to Yukihiro Matsumoto
----------------------------------------
Feature #11818: `Hash#compact`
https://bugs.ruby-lang.org/issues/11818#change-59760
* Author: Tsuyoshi Sawada
* Status: Assigned
* Priority: Normal
* Assignee: Yukihiro Matsumoto
----------------------------------------
I request `Hash#compact` and `Hash#compact!` that remove the key-value pairs whose value is `nil`, as follows:
h1 = {a:, 1, b: nil, c: 2}
h1.compact # => {a: 1, c: 2}
h1 # => {a: 1, b: nil, c: 2}
h2 = {a:, 1, b: nil, c: 2}
h2.compact! # => {a: 1, c: 2}
h2 # => {a: 1, c: 2}
h3 = {a:, 1, c: 2}
h3.compact! # => nil
h3 # => {a: 1, c: 2}
I believe people have frequent need to do this.
--
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>