diff options
author | Burdette Lamar <[email protected]> | 2025-03-11 20:54:49 -0500 |
---|---|---|
committer | <[email protected]> | 2025-03-11 21:54:49 -0400 |
commit | 1b2cc9c2b80da4618499ab3dd3dd70a499546c75 () | |
tree | cd8d5dbe37ada184b00b08ef2a8b70990dee27c2 /hash.c | |
parent | 86eff8565b21ca7e8deff572feedbcd7d2421d55 (diff) |
[DOC] Tweaks for Hash#slice
Notes: Merged: https://.com/ruby/ruby/pull/12907 Merged-By: peterzhu2118 <[email protected]>
-rw-r--r-- | hash.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2646,11 +2646,13 @@ rb_hash_reject(VALUE hash) * call-seq: * slice(*keys) -> new_hash * - * Returns a new +Hash+ object containing the entries for the given +keys+: * h = {foo: 0, bar: 1, baz: 2} - * h.slice(:baz, :foo) # => {baz: 2, foo: 0} * - * Any given +keys+ that are not found are ignored. */ static VALUE |