[前][次][番号順一覧][スレッド一覧]

ruby-changes:29205

From: kou <ko1@a...>
Date: Wed, 12 Jun 2013 20:19:30 +0900 (JST)
Subject: [ruby-changes:29205] kou:r41257 (trunk): * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.

kou	2013-06-12 20:19:18 +0900 (Wed, 12 Jun 2013)

  New Revision: 41257

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41257

  Log:
    * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
    
    Sorry for forgetting it in r41236.

  Modified files:
    trunk/ChangeLog
    trunk/lib/xmlrpc/client.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41256)
+++ ChangeLog	(revision 41257)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jun 12 20:18:03 2013  Kouhei Sutou  <kou@c...>
+
+	* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
+
 Wed Jun 12 18:19:41 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (validate_integer_pack_format): supported_flags argument
@@ -71,7 +75,6 @@ Wed Jun 12 06:35:01 2013  Tanaka Akira https://github.com/ruby/ruby/blob/trunk/ChangeLog#L75
 
 Wed Jun 12 00:07:46 2013  Kouhei Sutou  <kou@c...>
 
-	* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
 	* test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple):
 	  Add a test for the extracted method.
 
Index: lib/xmlrpc/client.rb
===================================================================
--- lib/xmlrpc/client.rb	(revision 41256)
+++ lib/xmlrpc/client.rb	(revision 41257)
@@ -506,7 +506,12 @@ module XMLRPC # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/xmlrpc/client.rb#L506
         raise "Wrong size. Was #{data.bytesize}, should be #{expected}"
       end
 
-      set_cookies = resp.get_fields("Set-Cookie")
+      parse_set_cookies(resp.get_fields("Set-Cookie"))
+
+      return data
+    end
+
+    def parse_set_cookies(set_cookies)
       if set_cookies and !set_cookies.empty?
         require 'webrick/cookie'
         @cookie = set_cookies.collect do |set_cookie|
@@ -514,8 +519,6 @@ module XMLRPC # :nodoc: https://github.com/ruby/ruby/blob/trunk/lib/xmlrpc/client.rb#L519
           WEBrick::Cookie.new(cookie.name, cookie.value).to_s
         end.join("; ")
       end
-
-      return data
     end
 
     def gen_multicall(methods=[], async=false)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]