aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-02 01:08:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-02 01:08:27 +0000
commit754ef6a47e868e2fe8d9e8e214bd84374cb5ed47 (patch)
treeec9c9e7b31fba8fd7883bb7c15140a751a603739 /hash.c
parent673d2a9acf88066c852de18ed0f21e002fe47819 (diff)
downloadruby-754ef6a47e868e2fe8d9e8e214bd84374cb5ed47.tar.gz
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@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index c23b348f24..a80bd0a89d 100644
--- a/hash.c
+++ b/hash.c
@@ -2819,10 +2819,10 @@ rb_hash_compact(VALUE hash)
/*
* 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 }