diff options
author | Sidu Ponnappa <ckponnappa@gmail.com> | 2011-05-25 17:25:32 +0530 |
---|---|---|
committer | Sidu Ponnappa <ckponnappa@gmail.com> | 2011-07-11 11:41:22 +0530 |
commit | 83555a539891d18c37e788ebd5bdc819d4cfe7f5 (patch) | |
tree | dcf8a47e260ae86099b8104141bbaee70bbd02f2 /activesupport/lib | |
parent | b1bb9d17381c860653db50589774e83cb5c95293 (diff) | |
download | rails-83555a539891d18c37e788ebd5bdc819d4cfe7f5.tar.gz rails-83555a539891d18c37e788ebd5bdc819d4cfe7f5.tar.bz2 rails-83555a539891d18c37e788ebd5bdc819d4cfe7f5.zip |
Issue #636 - Parsing an xml file with multiple records and extra attributes (besides type) fails
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 2 |
1 files changed, 1 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 102378a029..5f07bb4f5a 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -95,7 +95,7 @@ class Hash case value.class.to_s when 'Hash' if value['type'] == 'array' - _, entries = Array.wrap(value.detect { |k,v| k != 'type' }) + _, entries = Array.wrap(value.detect { |k,v| not v.is_a?(String) }) if entries.nil? || (c = value['__content__'] && c.blank?) [] else |