mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* Add test case for empty array and first method with args.
Patch by @yui-knk [fix GH-955] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a894e920aa
commit
aebf152ea4
3 changed files with 7 additions and 0 deletions
1
enum.c
1
enum.c
|
@ -828,6 +828,7 @@ static VALUE enum_take(VALUE obj, VALUE n);
|
|||
* %w[foo bar baz].first(2) #=> ["foo", "bar"]
|
||||
* %w[foo bar baz].first(10) #=> ["foo", "bar", "baz"]
|
||||
* [].first #=> nil
|
||||
* [].first(10) #=> []
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue