summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-02-25 08:57:31 -0600
committerPeter Zhu <peter@peterzhu.ca>2025-02-26 09:28:05 -0500
commit43a729b1be1c03499e1fa8475364708f4a1ca39e (patch)
tree30fa12e5fb5d444274d964092e8bc4f1ec807bad
parenta870419f3a1f9a12d7458d4a7427d0766ea86911 (diff)
[DOC] Tweaks for Hash#replace
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12806
-rw-r--r--hash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 3eb2e3eadc..74ab772705 100644
--- a/hash.c
+++ b/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