aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/conversions.rb
diff options
context:
space:
mode:
authorSidu Ponnappa <ckponnappa@gmail.com>2011-05-25 17:25:32 +0530
committerSidu Ponnappa <ckponnappa@gmail.com>2011-07-11 11:41:22 +0530
commit83555a539891d18c37e788ebd5bdc819d4cfe7f5 (patch)
treedcf8a47e260ae86099b8104141bbaee70bbd02f2 /activesupport/lib/active_support/core_ext/hash/conversions.rb
parentb1bb9d17381c860653db50589774e83cb5c95293 (diff)
downloadrails-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/active_support/core_ext/hash/conversions.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb2
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