diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-04-05 05:39:45 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-04-05 05:39:45 +0000 |
commit | 361dcad8fd022065bc38fd557b0ec02d6e3f1a0b (patch) | |
tree | b76915bd4db75022fae743977f4e39e6b4e43cc0 /actionwebservice/lib/action_web_service/casting.rb | |
parent | d7a7d85dbdd2e13612affe48cca39aa48643944d (diff) | |
download | rails-361dcad8fd022065bc38fd557b0ec02d6e3f1a0b.tar.gz rails-361dcad8fd022065bc38fd557b0ec02d6e3f1a0b.tar.bz2 rails-361dcad8fd022065bc38fd557b0ec02d6e3f1a0b.zip |
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
Diffstat (limited to 'actionwebservice/lib/action_web_service/casting.rb')
-rw-r--r-- | actionwebservice/lib/action_web_service/casting.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionwebservice/lib/action_web_service/casting.rb b/actionwebservice/lib/action_web_service/casting.rb index 42ef97fd3b..88462d8cc9 100644 --- a/actionwebservice/lib/action_web_service/casting.rb +++ b/actionwebservice/lib/action_web_service/casting.rb @@ -29,8 +29,7 @@ module ActionWebService # :nodoc: def cast_expects(api_method, params) # :nodoc: return [] if api_method.expects.nil? - i = -1 - api_method.expects.map{ |type| cast(params[i+=1], type) } + api_method.expects.zip(params).map{ |type, param| cast(param, type) } end def cast_returns(api_method, return_value) # :nodoc: |