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
This commit is contained in:
nobu 2017-09-02 01:08:27 +00:00
Родитель d0501060ed
Коммит 0118b98545
1 изменённых файлов: 2 добавлений и 2 удалений

4
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 }