aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-04-19 19:00:06 +0000
committerLeon Breedt <bitserf@gmail.com>2005-04-19 19:00:06 +0000
commit3cf461323c0401e56e4a7d7962745bbbe5316fd1 (patch)
tree0a18c1c99d70a580185f55018f0ff662a9638c2e /actionwebservice/lib
parent41bc063e17107c1de0a907cbecc3fb1882ce8863 (diff)
downloadrails-3cf461323c0401e56e4a7d7962745bbbe5316fd1.tar.gz
rails-3cf461323c0401e56e4a7d7962745bbbe5316fd1.tar.bz2
rails-3cf461323c0401e56e4a7d7962745bbbe5316fd1.zip
Fix regression where nil values were incorrectly being cast into the
default values for their base types. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib')
-rw-r--r--actionwebservice/lib/action_web_service/casting.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionwebservice/lib/action_web_service/casting.rb b/actionwebservice/lib/action_web_service/casting.rb
index b30de2d4c4..91f36d113a 100644
--- a/actionwebservice/lib/action_web_service/casting.rb
+++ b/actionwebservice/lib/action_web_service/casting.rb
@@ -39,6 +39,7 @@ module ActionWebService # :nodoc:
def cast(value, signature_type) # :nodoc:
return value if signature_type.nil? # signature.length != params.length
+ return nil if value.nil?
unless signature_type.array? || signature_type.structured?
return value if canonical_type(value.class) == signature_type.type
end