aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorYehuda Katz <wycats@Yehuda-Katz.local>2009-11-09 10:57:20 -0800
committerYehuda Katz <wycats@Yehuda-Katz.local>2009-11-09 10:57:20 -0800
commit790c062280c0d23c2033e4983c13d402c0424f2a (patch)
tree7b652b420411779072c2371a42e84c83525f63b1 /activesupport/lib/active_support/core_ext
parent51fe6d05e73a4e0f8481f4e441f4ca886d65a69c (diff)
parent303991288633effea5a1d1774dbd861951303fe5 (diff)
downloadrails-790c062280c0d23c2033e4983c13d402c0424f2a.tar.gz
rails-790c062280c0d23c2033e4983c13d402c0424f2a.tar.bz2
rails-790c062280c0d23c2033e4983c13d402c0424f2a.zip
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb
index 190173f8a0..35ccec5df4 100644
--- a/activesupport/lib/active_support/core_ext/hash/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -1,4 +1,5 @@
require 'active_support/time'
+require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/hash/reverse_merge'
class Hash
@@ -138,7 +139,7 @@ class Hash
case value.class.to_s
when 'Hash'
if value['type'] == 'array'
- child_key, entries = value.detect { |k,v| k != 'type' } # child_key is throwaway
+ child_key, entries = Array.wrap(value.detect { |k,v| k != 'type' }) # child_key is throwaway
if entries.nil? || (c = value['__content__'] && c.blank?)
[]
else