aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib/action_web_service
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-06-27 19:41:14 +0000
committerMarcel Molina <marcel@vernix.org>2006-06-27 19:41:14 +0000
commit68a320ad2047c483b4b07cd51c5043cdef562adb (patch)
tree7a783a08c9c0324c98f10f3cbf8b87f4d185e76f /actionwebservice/lib/action_web_service
parent236c7325df4ca2783c92dffc0f0b9592f822d95a (diff)
downloadrails-68a320ad2047c483b4b07cd51c5043cdef562adb.tar.gz
rails-68a320ad2047c483b4b07cd51c5043cdef562adb.tar.bz2
rails-68a320ad2047c483b4b07cd51c5043cdef562adb.zip
Fix invoke_layered since api_method didn't declare :expects. Closes #4720. [Kevin Ballard <kevin@sb.org>, Kent Sibilev]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib/action_web_service')
-rw-r--r--actionwebservice/lib/action_web_service/test_invoke.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionwebservice/lib/action_web_service/test_invoke.rb b/actionwebservice/lib/action_web_service/test_invoke.rb
index e4469851eb..7e714c941c 100644
--- a/actionwebservice/lib/action_web_service/test_invoke.rb
+++ b/actionwebservice/lib/action_web_service/test_invoke.rb
@@ -52,7 +52,7 @@ module Test # :nodoc:
end
protocol.register_api(api)
method = api.api_methods[api_method_name.to_sym]
- raise ArgumentError, "wrong number of arguments for rpc call (#{args.length} for #{method.expects.length})" unless args.length == method.expects.length
+ raise ArgumentError, "wrong number of arguments for rpc call (#{args.length} for #{method.expects.length})" if method && method.expects && args.length != method.expects.length
protocol.encode_request(public_method_name(service_name, api_method_name), args.dup, method.expects)
end