diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-08 21:55:43 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-08 22:02:57 -0800 |
commit | 20cdaddfd27dfeef5c853e85fafa4e13b6da05f3 (patch) | |
tree | 6a102d87cb71ac8fbc7dafeee2ed7e185d68b90d /activesupport/lib/active_support/core_ext | |
parent | 7ad461b44dabb586fbad190493ac4ecd96104597 (diff) | |
download | rails-20cdaddfd27dfeef5c853e85fafa4e13b6da05f3.tar.gz rails-20cdaddfd27dfeef5c853e85fafa4e13b6da05f3.tar.bz2 rails-20cdaddfd27dfeef5c853e85fafa4e13b6da05f3.zip |
Ruby 1.9.2: work around changes to flatten and nil.to_str
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 3 |
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 |