From 8741340545cb8daa05dcac1209171be9aa7255f6 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 14 Nov 2005 08:39:34 +0000 Subject: [PATCH] * array.c (rb_ary_first): RDoc update from Daniel Berger . [ruby-core:06577]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ array.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e80dcac63b..ab4ab399e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 14 17:36:22 2005 Yukihiro Matsumoto + + * array.c (rb_ary_first): RDoc update from Daniel Berger + . [ruby-core:06577]. + Sun Nov 13 10:55:24 2005 Minero Aoki * lib/uri/common.rb (escape): regard second argument as a diff --git a/array.c b/array.c index 5a8c391ca4..54ccd8f49f 100644 --- a/array.c +++ b/array.c @@ -776,10 +776,11 @@ rb_ary_at(VALUE ary, VALUE pos) /* * call-seq: * array.first -> obj or nil - * array.first(n) -> an_array - * - * Returns the first element of the array. If the array is empty, - * returns nil. + * array.first(n) -> an_array + * + * Returns the first element, or the first +n+ elements, of the array. + * If the array is empty, the first form returns nil, and the + * second form returns an empty array. * * a = [ "q", "r", "s", "t" ] * a.first #=> "q"