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 --- .../lib/action_web_service/protocol/soap_protocol.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'actionwebservice/lib/action_web_service/protocol') diff --git a/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb b/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb index cc3e90a4cc..4bc9d2806e 100644 --- a/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +++ b/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb @@ -40,13 +40,10 @@ module ActionWebService # :nodoc: param_types.each{ |type| marshaler.register_type(type) } if param_types qname = XSD::QName.new(marshaler.type_namespace, method_name) param_def = [] - i = 0 if param_types - params = params.map do |param| - param_type = param_types[i] - param_def << ['in', param_type.name, marshaler.lookup_type(param_type).mapping] - i += 1 - [param_type.name, marshaler.ruby_to_soap(param)] + params = param_types.zip(params).map do |type, param| + param_def << ['in', type.name, marshaler.lookup_type(type).mapping] + [type.name, marshaler.ruby_to_soap(param)] end else params = [] -- cgit v1.2.3