From 3cf461323c0401e56e4a7d7962745bbbe5316fd1 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Tue, 19 Apr 2005 19:00:06 +0000 Subject: 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 --- actionwebservice/lib/action_web_service/casting.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionwebservice/lib') 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 -- cgit v1.2.3