summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-01-24 12:13:43 -0600
committerPeter Zhu <peter@peterzhu.ca>2025-01-26 16:54:57 -0500
commitb346b4974442eb85fc40e9be234714d1ce3c5a0e (patch)
tree7edd795086ea699509a668bd8e5725e2d191e5ab
parentd4a1a2780c39bc648496ac92fc6e6ce2eb38ab47 (diff)
[DOC] Tweaks for rb_hash_s_create
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12631
-rw-r--r--hash.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hash.c b/hash.c
index 7cb43fd5cf..4a0ca58c1e 100644
--- a/hash.c
+++ b/hash.c
@@ -1791,7 +1791,7 @@ static VALUE rb_hash_to_a(VALUE hash);
/*
* call-seq:
* Hash[] -> new_empty_hash
- * Hash[hash] -> new_hash
+ * Hash[other_hash] -> new_hash
* Hash[ [*2_element_arrays] ] -> new_hash
* Hash[*objects] -> new_hash
*
@@ -1800,20 +1800,20 @@ static VALUE rb_hash_to_a(VALUE hash);
*
* With no argument given, returns a new empty hash.
*
- * With a single argument given that is a hash,
- * returns a new hash initialized with the entries from +hash+
+ * With a single argument +other_hash+ given that is a hash,
+ * returns a new hash initialized with the entries from that hash
* (but not with its +default+ or +default_proc+):
*
* h = {foo: 0, bar: 1, baz: 2}
* Hash[h] # => {foo: 0, bar: 1, baz: 2}
*
- * With a single argument given that is an array of 2-element arrays,
+ * With a single argument +2_element_arrays+ given that is an array of 2-element arrays,
* returns a new hash wherein each given 2-element array forms a
* key-value entry:
*
* Hash[ [ [:foo, 0], [:bar, 1] ] ] # => {foo: 0, bar: 1}
*
- * With an even number of arguments given,
+ * With an even number of arguments +objects+ given,
* returns a new hash wherein each successive pair of arguments
* is a key-value entry:
*