ruby-changes:47603
From: nobu <ko1@a...>
Date: Sat, 2 Sep 2017 10:08:31 +0900 (JST)
Subject: [ruby-changes:47603] nobu:r59719 (trunk): Update Hash#compact! documentation [ci skip]
nobu 2017-09-02 10:08:27 +0900 (Sat, 02 Sep 2017) New Revision: 59719 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59719 Log: Update Hash#compact! documentation [ci skip] * hash.c (rb_hash_compact_bang): [DOC] update the case if no changes were made. [ruby-core:82591] [Bug #13855] [Fix GH-1692] Author: Lucas Buchala <lucasbuchala@g...> Modified files: trunk/hash.c Index: hash.c =================================================================== --- hash.c (revision 59718) +++ hash.c (revision 59719) @@ -2819,10 +2819,10 @@ rb_hash_compact(VALUE hash) https://github.com/ruby/ruby/blob/trunk/hash.c#L2819 /* * call-seq: - * hsh.compact! -> hsh + * hsh.compact! -> hsh or nil * * Removes all nil values from the hash. - * Returns the hash. + * Returns nil if no changes were made, otherwise returns the hash. * * h = { a: 1, b: false, c: nil } * h.compact! #=> { a: 1, b: false } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/