diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb index ddd8fcc..c506b38 100644 --- a/lib/xmlrpc/client.rb +++ b/lib/xmlrpc/client.rb @@ -44,7 +44,7 @@ module XMLRPC # :nodoc: # # server = XMLRPC::Client.new("www.ruby-lang.org", "/RPC2", 80) # ok, param = server.call2("michael.add", 4, 5) - # if ok then + # if ok # puts "4 + 5 = #{param}" # else # puts "Error:" diff --git a/lib/xmlrpc/parser.rb b/lib/xmlrpc/parser.rb index 26c5801..582046a 100644 --- a/lib/xmlrpc/parser.rb +++ b/lib/xmlrpc/parser.rb @@ -205,7 +205,7 @@ def nodeMustBe(node, name) raise "error" end - if not cmp then + if not cmp raise "wrong xml-rpc (name)" end @@ -217,14 +217,14 @@ def hasOnlyOneChild(node, name=nil) if node.childNodes.to_a.size != 1 raise "wrong xml-rpc (size)" end - if name != nil then + if name != nil nodeMustBe(node.firstChild, name) end end def assert(b) - if not b then + if not b raise "assert-fail" end end @@ -436,7 +436,7 @@ def methodCall(node) assert( (1..2).include?( node.childNodes.to_a.size ) ) name = methodName(node[0]) - if node.childNodes.to_a.size == 2 then + if node.childNodes.to_a.size == 2 pa = params(node[1]) else # no parameters given pa = [] diff --git a/lib/xmlrpc/utils.rb b/lib/xmlrpc/utils.rb index 402157b..8cdf866 100644 --- a/lib/xmlrpc/utils.rb +++ b/lib/xmlrpc/utils.rb @@ -46,7 +46,7 @@ def set_parser(parser) def create # if set_writer was not already called then call it now - if @create.nil? then + if @create.nil? set_writer(Config.default_writer.new) end @create @@ -54,7 +54,7 @@ def create def parser # if set_parser was not already called then call it now - if @parser.nil? then + if @parser.nil? set_parser(Config.default_parser.new) end @parser