aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/conversions.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-04-26 01:14:17 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-04-26 01:14:17 +0000
commitddd243a9c11b54fd13328a86a34ae997f63cb839 (patch)
treea0aa010a5e7e7410f28097512435c105a09cde2f /activesupport/lib/active_support/core_ext/hash/conversions.rb
parent15f06ea8c25b9570bb86a1b1b06ffe3d598b5710 (diff)
downloadrails-ddd243a9c11b54fd13328a86a34ae997f63cb839.tar.gz
rails-ddd243a9c11b54fd13328a86a34ae997f63cb839.tar.bz2
rails-ddd243a9c11b54fd13328a86a34ae997f63cb839.zip
Pull file from xml value only if it's a Hash. Closes #8190.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/conversions.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb
index e4103f1cb7..2334bb671b 100644
--- a/activesupport/lib/active_support/core_ext/hash/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -173,7 +173,7 @@ module ActiveSupport #:nodoc:
# Turn { :files => { :file => #<StringIO> } into { :files => #<StringIO> } so it is compatible with
# how multipart uploaded files from HTML appear
- if xml_value && xml_value["file"].is_a?(StringIO)
+ if xml_value.is_a?(Hash) && xml_value["file"].is_a?(StringIO)
xml_value["file"]
else
xml_value
@@ -218,4 +218,4 @@ module ActiveSupport #:nodoc:
end
end
end
-end \ No newline at end of file
+end