diff options
author | sonots <sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 23:44:15 +0000 |
---|---|---|
committer | sonots <sonots@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 23:44:15 +0000 |
commit | 2adcc0b8faa27d9ffdea21403fbf97ec2f3fea66 (patch) | |
tree | d1feee224013a03c9861b86ea3c82a6a4eac3066 /string.c | |
parent | 71b932d675b53cbad6048e2c44a86b39b4310ad3 (diff) |
* object.c: Improve documentation of Kernel#Array
Array(arg) does more than just call to_ary or to_a on the argument.
It also falls back to returning [arg] if neither method is available.
This patch extends the description and adds a few examples of how it
handles common types of arguments, including an integer
(which does not implement to_ary or to_a).
Extend Kernel#Array doc to mention TypeError
patched by ragesoss (Sage Ross) [fix GH-1663]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
0 files changed, 0 insertions, 0 deletions