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 | 06554c7058a710f106c1ce84d608c88675375dd2 (patch) | |
| tree | e0e08980c7ca0789432534dfa4ef039de3440552 | |
| parent | 9463ec0981a2578eee2496c22b3e61751499ad14 (diff) | |
| download | ruby-06554c7058a710f106c1ce84d608c88675375dd2.tar.gz ruby-06554c7058a710f106c1ce84d608c88675375dd2.tar.xz ruby-06554c7058a710f106c1ce84d608c88675375dd2.zip | |
* array.c (rb_ary_first): RDoc update from Daniel Berger
<djberg96@yahoo.com>. [ruby-core:06577].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | array.c | 9 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Mon Nov 14 17:36:22 2005 Yukihiro Matsumoto <matz@ruby-lang.org> + + * array.c (rb_ary_first): RDoc update from Daniel Berger + <djberg96@yahoo.com>. [ruby-core:06577]. + Sun Nov 13 10:55:24 2005 Minero Aoki <aamine@loveruby.net> * lib/uri/common.rb (escape): regard second argument as a @@ -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" |
