ruby-changes:26655
From: naruse <ko1@a...>
Date: Sun, 6 Jan 2013 00:04:54 +0900 (JST)
Subject: [ruby-changes:26655] naruse:r38706 (trunk): Suppress warnings
naruse 2013-01-06 00:04:46 +0900 (Sun, 06 Jan 2013) New Revision: 38706 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38706 Log: Suppress warnings Modified files: trunk/test/net/http/test_http.rb Index: test/net/http/test_http.rb =================================================================== --- test/net/http/test_http.rb (revision 38705) +++ test/net/http/test_http.rb (revision 38706) @@ -3,6 +3,7 @@ require 'test/unit' https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L3 require 'net/http' require 'stringio' require_relative 'utils' +require_relative '../../ruby/envutil' class TestNetHTTP < Test::Unit::TestCase @@ -291,8 +292,11 @@ module TestNetHTTP_version_1_1_methods https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L292 def test_get2 start {|http| http.get2('/') {|res| - assert_kind_of Net::HTTPResponse, res - assert_kind_of Net::HTTPResponse, res.header + EnvUtil.suppress_warning do + assert_kind_of Net::HTTPResponse, res + assert_kind_of Net::HTTPResponse, res.header + end + unless self.is_a?(TestNetHTTP_v1_2_chunked) assert_not_nil res['content-length'] end @@ -335,9 +339,11 @@ module TestNetHTTP_version_1_1_methods https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb#L339 def _test_post__no_data(http) unless self.is_a?(TestNetHTTP_v1_2_chunked) - data = nil - res = http.post('/', data) - assert_not_equal '411', res.code + EnvUtil.suppress_warning do + data = nil + res = http.post('/', data) + assert_not_equal '411', res.code + end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/