From: Joseph Jones Date: 2015-12-17T21:07:36-07:00 Subject: [ruby-core:72312] [Ruby trunk - Feature #11818] [Open] `Hash#compact` --56738688_a0382c5_16c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Joseph Jones liked your message with Boxer. On December 14, 2015 at 22:09= :54 MST, sawadatsuyoshi=40gmail.com wrote:Issue =2311818 has been reporte= d by Tsuyoshi Sawada.----------------------------------------=46eature =23= 11818: =60Hash=23compact=60https://bugs.ruby-lang.org/issues/11818* Autho= r: Tsuyoshi Sawada* Status: Open* Priority: Normal* Assignee: -----------= -----------------------------I request =60Hash=23compact=60 and =60Hash=23= compact=21=60 that remove the key-value pairs whose value is =60nil=60, a= s follows: h1 =3D =7Ba:, 1, b: nil, c: 2=7D h1.compact =23 =3D> =7Ba: 1, = c: 2=7D h1 =23 =3D> =7Ba: 1, b: nil, c: 2=7D h2 =3D =7Ba:, 1, b: nil, c: = 2=7D h2.compact=21 =23 =3D> =7Ba: 1, c: 2=7D h2 =23 =3D> =7Ba: 1, c: 2=7D= h3 =3D =7Ba:, 1, c: 2=7D h3.compact=21 =23 =3D> nil h3 =23 =3D> =7Ba: 1,= c: 2=7DI believe people have frequent need to do this.-- https://bugs.ru= by-lang.org/ --56738688_a0382c5_16c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Joseph Jones liked your message with Boxer.


= On December 14, 2015 at 22:09:54 MST, sawadatsuyoshi=40gmail.com wrote:
Issue =2311818 has been= reported by Tsuyoshi Sawada.

--------------------------------= --------
=46eature =2311818: =60Hash=23compact=60
https://bugs.= ruby-lang.org/issues/11818

* Author: Tsuyoshi Sawada
* St= atus: Open
* Priority: Normal
* Assignee:
---------------= -------------------------
I request =60Hash=23compact=60 and =60Hash= =23compact=21=60 that remove the key-value pairs whose value is =60nil=60= , as follows:

h1 =3D =7Ba:, 1, b: nil, c: 2=7D
h1= .compact =23 =3D> =7Ba: 1, c: 2=7D
h1 =23 =3D> =7Ba: 1, b: nil, = c: 2=7D

h2 =3D =7Ba:, 1, b: nil, c: 2=7D
h2.compa= ct=21 =23 =3D> =7Ba: 1, c: 2=7D
h2 =23 =3D> =7Ba: 1, c: 2=7D

h3 =3D =7Ba:, 1, c: 2=7D
h3.compact=21 =23 =3D> nil<= br /> h3 =23 =3D> =7Ba: 1, c: 2=7D

I believe people have fr= equent need to do this.



--
https://bugs.ruby= -lang.org/
--56738688_a0382c5_16c--