Document the change to Array.wrap's behaviour that was made in b4d8c7d148

This commit is contained in:
Jon Leighton 2011-06-30 18:18:07 +01:00
parent 9c9ec2172e
commit 9eabbabe74
1 changed files with 2 additions and 2 deletions

View File

@ -2249,8 +2249,8 @@ The method +Array.wrap+ wraps its argument in an array unless it is already an a
Specifically:
* If the argument is +nil+ an empty list is returned.
* Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned.
* Otherwise, returns an array with the argument as its single element.
* Otherwise, if the argument responds to +to_ary+ it is invoked, and if the value of +to_ary+ is not +nil+, it is returned.
* Otherwise, an array with the argument as its single element is returned.
<ruby>
Array.wrap(nil) # => []