diff options
Diffstat (limited to 'actionwebservice/lib/action_web_service/dispatcher/abstract.rb')
-rw-r--r-- | actionwebservice/lib/action_web_service/dispatcher/abstract.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb index 1df03d1777..b63fe65ce1 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb @@ -34,7 +34,12 @@ module ActionWebService # :nodoc: def web_service_direct_invoke(invocation) @method_params = invocation.method_ordered_params - return_value = self.__send__(invocation.api_method_name) + arity = method(invocation.api_method_name).arity rescue 0 + if arity < 0 || arity > 0 + return_value = self.__send__(invocation.api_method_name, *@method_params) + else + return_value = self.__send__(invocation.api_method_name) + end if invocation.api.has_api_method?(invocation.api_method_name) returns = invocation.returns ? invocation.returns[0] : nil else |