mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Tweaks for Hash#replace
This commit is contained in:
parent
a870419f3a
commit
43a729b1be
Notes:
git
2025-02-26 14:28:22 +00:00
1 changed files with 3 additions and 0 deletions
3
hash.c
3
hash.c
|
@ -2971,8 +2971,11 @@ rb_hash_aset(VALUE hash, VALUE key, VALUE val)
|
|||
*
|
||||
* Replaces the entire contents of +self+ with the contents of +other_hash+;
|
||||
* returns +self+:
|
||||
*
|
||||
* h = {foo: 0, bar: 1, baz: 2}
|
||||
* h.replace({bat: 3, bam: 4}) # => {bat: 3, bam: 4}
|
||||
*
|
||||
* Related: see {Methods for Assigning}[rdoc-ref:Hash@Methods+for+Assigning].
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue