ruby-changes:29232
From: kou <ko1@a...>
Date: Thu, 13 Jun 2013 22:37:05 +0900 (JST)
Subject: [ruby-changes:29232] kou:r41284 (trunk): * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Use
kou 2013-06-13 22:36:52 +0900 (Thu, 13 Jun 2013) New Revision: 41284 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41284 Log: * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Use guard style. Modified files: trunk/ChangeLog trunk/lib/xmlrpc/client.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 41283) +++ ChangeLog (revision 41284) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Jun 13 22:35:50 2013 Kouhei Sutou <kou@c...> + + * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Use + guard style. + Thu Jun 13 22:12:32 2013 Nobuyoshi Nakada <nobu@r...> * lib/fileutils.rb (FileUtils#rmdir): fix traversal loop, not trying Index: lib/xmlrpc/client.rb =================================================================== --- lib/xmlrpc/client.rb (revision 41283) +++ lib/xmlrpc/client.rb (revision 41284) @@ -512,13 +512,13 @@ module XMLRPC # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/xmlrpc/client.rb#L512 end def parse_set_cookies(set_cookies) - if set_cookies and !set_cookies.empty? - require 'webrick/cookie' - @cookie = set_cookies.collect do |set_cookie| - cookie = WEBrick::Cookie.parse_set_cookie(set_cookie) - WEBrick::Cookie.new(cookie.name, cookie.value).to_s - end.join("; ") - end + return if set_cookies.nil? + return if set_cookies.empty? + require 'webrick/cookie' + @cookie = set_cookies.collect do |set_cookie| + cookie = WEBrick::Cookie.parse_set_cookie(set_cookie) + WEBrick::Cookie.new(cookie.name, cookie.value).to_s + end.join("; ") end def gen_multicall(methods=[], async=false) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/