summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-03-26 16:00:20 -0500
committerPeter Zhu <peter@peterzhu.ca>2025-03-29 17:05:21 -0400
commit9e87323ad00f393fbaa8b9e170248fe11bd652aa (patch)
tree547bf3f240c69f320cd64b2a4b7c326b02d4f819
parentdbc1ceca3264246ab2e7b47e06e5e62f0409051e (diff)
[DOC] Tweaks for Hash#values_at
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12989
-rw-r--r--hash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 0ebbbada3b..042d8b9e0e 100644
--- a/hash.c
+++ b/hash.c
@@ -2711,13 +2711,17 @@ rb_hash_except(int argc, VALUE *argv, VALUE hash)
* call-seq:
* values_at(*keys) -> new_array
*
- * Returns a new Array containing values for the given +keys+:
+ * Returns a new array containing values for the given +keys+:
+ *
* h = {foo: 0, bar: 1, baz: 2}
* h.values_at(:baz, :foo) # => [2, 0]
*
* The {hash default}[rdoc-ref:Hash@Hash+Default] is returned
* for each key that is not found:
+ *
* h.values_at(:hello, :foo) # => [nil, 0]
+ *
+ * Related: see {Methods for Fetching}[rdoc-ref:Hash@Methods+for+Fetching].
*/
static VALUE