ruby-changes:34491
From: naruse <ko1@a...>
Date: Fri, 27 Jun 2014 15:25:58 +0900 (JST)
Subject: [ruby-changes:34491] naruse:r46572 (trunk): suppress warnings: URI.regexp is obsolete
naruse 2014-06-27 15:25:44 +0900 (Fri, 27 Jun 2014) New Revision: 46572 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46572 Log: suppress warnings: URI.regexp is obsolete Modified files: trunk/test/uri/test_common.rb Index: test/uri/test_common.rb =================================================================== --- test/uri/test_common.rb (revision 46571) +++ test/uri/test_common.rb (revision 46572) @@ -33,17 +33,19 @@ class TestCommon < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/uri/test_common.rb#L33 end def test_regexp - assert_instance_of Regexp, URI.regexp - assert_instance_of Regexp, URI.regexp(['http']) - assert_equal URI.regexp, URI.regexp - assert_equal 'http://', 'x http:// x'.slice(URI.regexp) - assert_equal 'http://', 'x http:// x'.slice(URI.regexp(['http'])) - assert_equal 'http://', 'x http:// x ftp://'.slice(URI.regexp(['http'])) - assert_equal nil, 'http://'.slice(URI.regexp([])) - assert_equal nil, ''.slice(URI.regexp) - assert_equal nil, 'xxxx'.slice(URI.regexp) - assert_equal nil, ':'.slice(URI.regexp) - assert_equal 'From:', 'From:'.slice(URI.regexp) + EnvUtil.suppress_warning do + assert_instance_of Regexp, URI.regexp + assert_instance_of Regexp, URI.regexp(['http']) + assert_equal URI.regexp, URI.regexp + assert_equal 'http://', 'x http:// x'.slice(URI.regexp) + assert_equal 'http://', 'x http:// x'.slice(URI.regexp(['http'])) + assert_equal 'http://', 'x http:// x ftp://'.slice(URI.regexp(['http'])) + assert_equal nil, 'http://'.slice(URI.regexp([])) + assert_equal nil, ''.slice(URI.regexp) + assert_equal nil, 'xxxx'.slice(URI.regexp) + assert_equal nil, ':'.slice(URI.regexp) + assert_equal 'From:', 'From:'.slice(URI.regexp) + end end def test_kernel_uri -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/