diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-02-15 10:46:46 -0600 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-02-16 12:56:48 -0500 |
| commit | e3ad6524906231d6bd72b5f568651ab142c68764 (patch) | |
| tree | 04c1555fa7b68081d5dcf138da524e81cc34497a | |
| parent | 23c4ac9559a05d7be4534d8e552d8dc95e272867 (diff) | |
[DOC] Tweaks for Hash#compact
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12755
| -rw-r--r-- | hash.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4347,9 +4347,11 @@ delete_if_nil(VALUE key, VALUE value, VALUE hash) * compact -> new_hash * * Returns a copy of +self+ with all +nil+-valued entries removed: + * * h = {foo: 0, bar: nil, baz: 2, bat: nil} - * h1 = h.compact - * h1 # => {foo: 0, baz: 2} + * h.compact # => {foo: 0, baz: 2} + * + * Related: see {Methods for Deleting}[rdoc-ref:Hash@Methods+for+Deleting]. */ static VALUE |
