diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-14 08:39:34 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-14 08:39:34 +0000 |
commit | 8741340545cb8daa05dcac1209171be9aa7255f6 (patch) | |
tree | e0e08980c7ca0789432534dfa4ef039de3440552 /array.c | |
parent | 18ab4853279c29279433cbed81550ee7f34dfb08 (diff) | |
download | ruby-8741340545cb8daa05dcac1209171be9aa7255f6.tar.gz |
* array.c (rb_ary_first): RDoc update from Daniel Berger
<djberg96@yahoo.com>. [ruby-core:06577].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 <code>nil</code>. + * 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 <code>nil</code>, and the + * second form returns an empty array. * * a = [ "q", "r", "s", "t" ] * a.first #=> "q" |