diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-06 23:30:03 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-06 23:30:03 +0000 |
commit | ce2f69862e019a570b6793b1a4753476a9cb72a6 (patch) | |
tree | 1a1977c7f41fdd0575079941c1f811b361174b7b /lib/xmlrpc | |
parent | 9e9264c8d55b63e1033ed1a415ca9280744cf446 (diff) | |
download | ruby-ce2f69862e019a570b6793b1a4753476a9cb72a6.tar.gz |
* lib/xmlrpc/parser.rb: support i8 types. Thanks Stas Kelvich!
[ruby-core:29246] [Feature #3090]
* test/xmlrpc/test_client.rb: supporting test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/xmlrpc')
-rw-r--r-- | lib/xmlrpc/parser.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/xmlrpc/parser.rb b/lib/xmlrpc/parser.rb index eb3c9b3441..5db139e751 100644 --- a/lib/xmlrpc/parser.rb +++ b/lib/xmlrpc/parser.rb @@ -169,7 +169,7 @@ module XMLRPC private # - # remove all whitespaces but in the tags i4, int, boolean.... + # remove all whitespaces but in the tags i4, i8, int, boolean.... # and all comments # def removeWhitespacesAndComments(node) @@ -179,7 +179,7 @@ module XMLRPC case _nodeType(nd) when :TEXT # TODO: add nil? - unless %w(i4 int boolean string double dateTime.iso8601 base64).include? node.nodeName + unless %w(i4 i8 int boolean string double dateTime.iso8601 base64).include? node.nodeName if node.nodeName == "value" if not node.childNodes.to_a.detect {|n| _nodeType(n) == :ELEMENT}.nil? @@ -253,7 +253,7 @@ module XMLRPC def integer(node) #TODO: check string for float because to_i returnsa # 0 when wrong string - nodeMustBe(node, %w(i4 int)) + nodeMustBe(node, %w(i4 i8 int)) hasOnlyOneChild(node) Convert.int(text(node.firstChild)) @@ -415,7 +415,7 @@ module XMLRPC text_zero_one(node) when :ELEMENT case child.nodeName - when "i4", "int" then integer(child) + when "i4", "i8", "int" then integer(child) when "boolean" then boolean(child) when "string" then string(child) when "double" then double(child) @@ -525,7 +525,7 @@ module XMLRPC case name when "string" @value = @data - when "i4", "int" + when "i4", "i8", "int" @value = Convert.int(@data) when "boolean" @value = Convert.boolean(@data) |