Skip to content

Commit 9e87323

Browse files
BurdetteLamarpeterzhu2118
authored andcommitted
[DOC] Tweaks for Hash#values_at
1 parent dbc1cec commit 9e87323

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hash.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2711,13 +2711,17 @@ rb_hash_except(int argc, VALUE *argv, VALUE hash)
27112711
* call-seq:
27122712
* values_at(*keys) -> new_array
27132713
*
2714-
* Returns a new Array containing values for the given +keys+:
2714+
* Returns a new array containing values for the given +keys+:
2715+
*
27152716
* h = {foo: 0, bar: 1, baz: 2}
27162717
* h.values_at(:baz, :foo) # => [2, 0]
27172718
*
27182719
* The {hash default}[rdoc-ref:Hash@Hash+Default] is returned
27192720
* for each key that is not found:
2721+
*
27202722
* h.values_at(:hello, :foo) # => [nil, 0]
2723+
*
2724+
* Related: see {Methods for Fetching}[rdoc-ref:Hash@Methods+for+Fetching].
27212725
*/
27222726

27232727
static VALUE

0 commit comments

Comments
 (0)