diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-22 02:50:45 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-22 02:50:45 +0000 |
commit | c853e2d86e4d074e773cf06b2d9ee6519fc95c15 (patch) | |
tree | 24e61c4e0903cdc7cc8d39196b2cbc77a387309d /lib/xmlrpc | |
parent | 33883ded8b9d9578c26bd3706acc185df8c1abc1 (diff) |
* lib/xmlrpc/create.rb (XMLRPC::Create#conv2value):
XML-RPC's int is 32bit int, and Fixnum also may be beyond 32bit.
* lib/xmlrpc/create.rb (XMLRPC::Create#conv2value):
XML-RPC doesn't allow Infinity and NaN.
http://www.xmlrpc.com/spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/xmlrpc')
-rw-r--r-- | lib/xmlrpc/create.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/xmlrpc/create.rb b/lib/xmlrpc/create.rb index 2d38a44b30..4e4a31e890 100644 --- a/lib/xmlrpc/create.rb +++ b/lib/xmlrpc/create.rb @@ -178,10 +178,8 @@ module XMLRPC def conv2value(param) val = case param - when Fixnum - @writer.tag("i4", param.to_s) - - when Bignum + when Fixnum, Bignum + # XML-RPC's int is 32bit int, and Fixnum also may be beyond 32bit if Config::ENABLE_BIGINT @writer.tag("i4", param.to_s) else @@ -208,6 +206,8 @@ module XMLRPC end when Float + raise "Wrong value Infinity. Not allowed!" if param.infinite? + raise "Wrong value NaN. Not allowed!" if param.nan? @writer.tag("double", param.to_s) when Struct |