Skip to content

Commit e3ad652

Browse files
BurdetteLamarpeterzhu2118
authored andcommitted
[DOC] Tweaks for Hash#compact
1 parent 23c4ac9 commit e3ad652

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hash.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4347,9 +4347,11 @@ delete_if_nil(VALUE key, VALUE value, VALUE hash)
43474347
* compact -> new_hash
43484348
*
43494349
* Returns a copy of +self+ with all +nil+-valued entries removed:
4350+
*
43504351
* h = {foo: 0, bar: nil, baz: 2, bat: nil}
4351-
* h1 = h.compact
4352-
* h1 # => {foo: 0, baz: 2}
4352+
* h.compact # => {foo: 0, baz: 2}
4353+
*
4354+
* Related: see {Methods for Deleting}[rdoc-ref:Hash@Methods+for+Deleting].
43534355
*/
43544356

43554357
static VALUE

0 commit comments

Comments
 (0)