1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use Float#finite?.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-04-22 13:35:43 +00:00
parent 4e04749516
commit d5b4cf7f79

View file

@ -206,8 +206,7 @@ module XMLRPC
end
when Float
raise "Wrong value Infinity. Not allowed!" if param.infinite?
raise "Wrong value NaN. Not allowed!" if param.nan?
raise "Wrong value #{param}. Not allowed!" unless param.finite?
@writer.tag("double", param.to_s)
when Struct