From d2f55e7eee3f82a9a8cc53a2c48294685d75b15e Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 25 Aug 2010 20:30:06 +0200 Subject: AS guide: Array.wrap vs splat is only valid for 1.8 --- railties/guides/source/active_support_core_extensions.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source/active_support_core_extensions.textile') diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 9b3bb1da15..561bae3be8 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -2226,7 +2226,7 @@ There's also a related idiom that uses the splat operator: [*object] -which returns +[nil]+ for +nil+, and calls to Array(object) otherwise +which in Ruby 1.8 returns +[nil]+ for +nil+, and calls to Array(object) otherwise. (Please if you know the exact behavior in 1.9 contact fxn.) Thus, in this case the behavior is different for +nil+, and the differences with Kernel#Array explained above apply to the rest of +object+s. -- cgit v1.2.3