aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib/action_web_service/struct.rb
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-04-04 22:58:02 +0000
committerLeon Breedt <bitserf@gmail.com>2005-04-04 22:58:02 +0000
commitd7a7d85dbdd2e13612affe48cca39aa48643944d (patch)
treed4a7cd556125b93b4d93e53a074ee730fc25effa /actionwebservice/lib/action_web_service/struct.rb
parenta87c1d4dd856d138e97e821083c905b481982399 (diff)
downloadrails-d7a7d85dbdd2e13612affe48cca39aa48643944d.tar.gz
rails-d7a7d85dbdd2e13612affe48cca39aa48643944d.tar.bz2
rails-d7a7d85dbdd2e13612affe48cca39aa48643944d.zip
* Fix casting of nested members in structured types if we have a signature
type available for it even if they are already of the desired type as SOAP/XML-RPC unmarshaling may have gotten it wrong: SOAP likes to always use DateTime no matter what, for example, whereas we allow a distinction between Date, DateTime and Time in the signature for convenience casting * Fix raising of exceptions by test_invoke so functional tests fail properly on exception instead of returning the exception object * Fix Struct#each_pair to yield the value and not the member type git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib/action_web_service/struct.rb')
-rw-r--r--actionwebservice/lib/action_web_service/struct.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionwebservice/lib/action_web_service/struct.rb b/actionwebservice/lib/action_web_service/struct.rb
index f2bfba9e30..536207aa95 100644
--- a/actionwebservice/lib/action_web_service/struct.rb
+++ b/actionwebservice/lib/action_web_service/struct.rb
@@ -24,7 +24,7 @@ module ActionWebService
# it can contain initial values for the structure member.
def initialize(values={})
if values.is_a?(Hash)
- values.map{|k,v| send('%s=' % k.to_s, v)}
+ values.map{|k,v| __send__('%s=' % k.to_s, v)}
end
end
@@ -36,7 +36,7 @@ module ActionWebService
# Iterates through each member
def each_pair(&block)
self.class.members.each do |name, type|
- yield name, type
+ yield name, self.__send__(name)
end
end