From f2790d03905c275e8eff3927429bdb77f6c75d3a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 6 Apr 2006 02:52:01 +0000 Subject: invoke / invoke_delegated / invoke_layered check for correct number of args (closes #4610) [jerrett@bravenet.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionwebservice/lib/action_web_service/test_invoke.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionwebservice/lib/action_web_service/test_invoke.rb') diff --git a/actionwebservice/lib/action_web_service/test_invoke.rb b/actionwebservice/lib/action_web_service/test_invoke.rb index ee15070851..e4469851eb 100644 --- a/actionwebservice/lib/action_web_service/test_invoke.rb +++ b/actionwebservice/lib/action_web_service/test_invoke.rb @@ -52,6 +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 protocol.encode_request(public_method_name(service_name, api_method_name), args.dup, method.expects) end -- cgit v1.2.3