diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-06-30 18:18:07 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-06-30 18:18:13 +0100 |
commit | 9eabbabe74dbe2fb37374b39c1b6cc6c59ed9ea0 (patch) | |
tree | 7b41844b98df0c6a9051df728257734a11bfba74 /railties | |
parent | 9c9ec2172e46710d1d5ac513a4ff52df35fef51f (diff) | |
download | rails-9eabbabe74dbe2fb37374b39c1b6cc6c59ed9ea0.tar.gz rails-9eabbabe74dbe2fb37374b39c1b6cc6c59ed9ea0.tar.bz2 rails-9eabbabe74dbe2fb37374b39c1b6cc6c59ed9ea0.zip |
Document the change to Array.wrap's behaviour that was made in b4d8c7d148c6b44eea6701687ca2a97df9088747
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index bbf5af5dcc..a0ed85cf01 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -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) # => [] |