From 9eabbabe74dbe2fb37374b39c1b6cc6c59ed9ea0 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 30 Jun 2011 18:18:07 +0100 Subject: [PATCH] Document the change to Array.wrap's behaviour that was made in b4d8c7d148c6b44eea6701687ca2a97df9088747 --- railties/guides/source/active_support_core_extensions.textile | 4 ++-- 1 file 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. Array.wrap(nil) # => [] -- GitLab