summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-20 15:03:52 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-20 15:03:52 +0000
commitaa58a684b7caea9ef3666b6df10bf13c1e11f6c8 (patch)
treebf50b0a691387393a26ba24b38ac5f46857fc7c0 /array.c
parent68de2e580089e6894f37755d227db99ce1c8e32a (diff)
* array.c (rb_get_values_at): Improve rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/array.c b/array.c
index 332a7711bd..bbe9f60e40 100644
--- a/array.c
+++ b/array.c
@@ -2607,10 +2607,10 @@ rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE (*func) (VAL
* See also Array#select.
*
* a = %w{ a b c d e f }
- * a.values_at(1, 3, 5)
- * a.values_at(1, 3, 5, 7)
- * a.values_at(-1, -3, -5, -7)
- * a.values_at(1..3, 2...5)
+ * a.values_at(1, 3, 5) # => ["b", "d", "f"]
+ * a.values_at(1, 3, 5, 7) # => ["b", "d", "f", nil]
+ * a.values_at(-1, -2, -2, -7) # => ["f", "e", "e", nil]
+ * a.values_at(4..6, 3...6) # => ["e", "f", nil, "d", "e", "f"]
*/
static VALUE