summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorBurdetteLamar <[email protected]>2025-03-11 17:07:40 -0500
committerPeter Zhu <[email protected]>2025-03-11 21:52:38 -0400
commit5208d2f440ec3175dc48ba5672413bb3b5cb4fd7 ()
tree158e42d0a25f7c3295e1d0db30dec1e74f235a2e /hash.c
parent19a1370b345a6f9cbc7b9b0506eee683c0bb2cf2 (diff)
[DOC] Tweaks for Hash#shift
Notes: Merged: https://.com/ruby/ruby/pull/12906
-rw-r--r--hash.c12
1 files changed, 7 insertions, 5 deletions
@@ -2480,14 +2480,16 @@ shift_i_safe(VALUE key, VALUE value, VALUE arg)
* call-seq:
* shift -> [key, value] or nil
*
- * Removes the first hash entry
- * (see {Entry Order}[rdoc-ref:Hash@Entry+Order]);
- * returns a 2-element Array containing the removed key and value:
* h = {foo: 0, bar: 1, baz: 2}
* h.shift # => [:foo, 0]
- * h # => {bar: 1, baz: 2}
*
- * Returns nil if the hash is empty.
*/
static VALUE