From 361dcad8fd022065bc38fd557b0ec02d6e3f1a0b Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Tue, 5 Apr 2005 05:39:45 +0000 Subject: be explicit about the object to do #instance_eval in for delegated dispatching, clean up iterations to use #zip (bitsweat), git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../action_web_service/dispatcher/action_controller_dispatcher.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb') diff --git a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb index a4659e5183..822939a101 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb @@ -121,8 +121,7 @@ module ActionWebService # :nodoc: api_method = request.api_method params = request.method_params if api_method && api_method.expects - i = 0 - params = api_method.expects.map{ |type| param = "#{type.name}=>#{params[i].inspect}"; i+= 1; param } + params = api_method.expects.zip(params).map{ |type, param| "#{type.name}=>#{param.inspect}" } else params = params.map{ |param| param.inspect } end @@ -255,11 +254,9 @@ module ActionWebService # :nodoc: end else expects = method.expects - i = 1 expects.each do |type| binding = marshaler.register_type(type) xm.part('name' => type.name, 'type' => binding.qualified_type_name('typens')) - i += 1 end if expects end end -- cgit v1.2.3