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

ruby-changes:24628

From: naruse <ko1@a...>
Date: Fri, 10 Aug 2012 14:25:18 +0900 (JST)
Subject: [ruby-changes:24628] naruse:r36679 (trunk): Suppress warnings: Net::HTTPResponse#header is obsolete

naruse	2012-08-10 14:25:08 +0900 (Fri, 10 Aug 2012)

  New Revision: 36679

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

  Log:
    Suppress warnings: Net::HTTPResponse#header is obsolete

  Modified files:
    trunk/test/net/http/test_httpresponse.rb

Index: test/net/http/test_httpresponse.rb
===================================================================
--- test/net/http/test_httpresponse.rb	(revision 36678)
+++ test/net/http/test_httpresponse.rb	(revision 36679)
@@ -12,8 +12,8 @@
 hello
 EOS
     res = Net::HTTPResponse.read_new(io)
-    assert_equal('5', res.header['content-length'])
-    assert_equal('close', res.header['connection'])
+    assert_equal('5', res['content-length'])
+    assert_equal('close', res['connection'])
   end
 
   def test_multiline_header
@@ -28,8 +28,8 @@
 hello
 EOS
     res = Net::HTTPResponse.read_new(io)
-    assert_equal('XXX YYY', res.header['x-foo'])
-    assert_equal('XXX YYY', res.header['x-bar'])
+    assert_equal('XXX YYY', res['x-foo'])
+    assert_equal('XXX YYY', res['x-bar'])
   end
 
   def test_read_body

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

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