ruby-changes:33234
From: usa <ko1@a...>
Date: Tue, 11 Mar 2014 13:22:40 +0900 (JST)
Subject: [ruby-changes:33234] usa:r45313 (trunk): * test: get rid of warnings.
usa 2014-03-11 13:22:34 +0900 (Tue, 11 Mar 2014) New Revision: 45313 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45313 Log: * test: get rid of warnings. Modified files: trunk/test/fileutils/test_fileutils.rb trunk/test/mkmf/test_framework.rb trunk/test/strscan/test_stringscanner.rb trunk/test/testunit/test_redefinition.rb trunk/test/webrick/test_httprequest.rb Index: test/fileutils/test_fileutils.rb =================================================================== --- test/fileutils/test_fileutils.rb (revision 45312) +++ test/fileutils/test_fileutils.rb (revision 45313) @@ -1093,7 +1093,7 @@ class TestFileUtils < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/fileutils/test_fileutils.rb#L1093 assert_output_lines([]) { touch 'tmp/b' # string input for group, -1 for user - chown -1, input_group_2, 'tmp/b' + chown(-1, input_group_2, 'tmp/b') assert_ownership_group @groups[1], 'tmp/b' } end if have_file_perm? Index: test/testunit/test_redefinition.rb =================================================================== --- test/testunit/test_redefinition.rb (revision 45312) +++ test/testunit/test_redefinition.rb (revision 45313) @@ -2,8 +2,8 @@ require 'test/unit' https://github.com/ruby/ruby/blob/trunk/test/testunit/test_redefinition.rb#L2 class TestRedefinition < Test::Unit::TestCase def test_redefinition - assert_match /^test\/unit warning: method TestForTestRedefinition#test_redefinition is redefined$/, - redefinition + assert_match(/^test\/unit warning: method TestForTestRedefinition#test_redefinition is redefined$/, + redefinition) end def redefinition(*args) Index: test/webrick/test_httprequest.rb =================================================================== --- test/webrick/test_httprequest.rb (revision 45312) +++ test/webrick/test_httprequest.rb (revision 45313) @@ -349,7 +349,7 @@ GET / https://github.com/ruby/ruby/blob/trunk/test/webrick/test_httprequest.rb#L349 l = msg.size req.continue assert_not_equal l, msg.size - assert_match /HTTP\/1.1 100 continue\r\n\r\n\z/, msg + assert_match(/HTTP\/1.1 100 continue\r\n\r\n\z/, msg) assert !req['expect'] end Index: test/strscan/test_stringscanner.rb =================================================================== --- test/strscan/test_stringscanner.rb (revision 45312) +++ test/strscan/test_stringscanner.rb (revision 45313) @@ -461,7 +461,7 @@ class TestStringScanner < Test::Unit::Te https://github.com/ruby/ruby/blob/trunk/test/strscan/test_stringscanner.rb#L461 assert_equal true, s[4].tainted? s = StringScanner.new("foo bar baz") - s.scan /(?<a>\w+) (?<b>\w+) (\w+)/ + s.scan(/(?<a>\w+) (?<b>\w+) (\w+)/) assert_equal 'foo', s[1] assert_equal 'bar', s[2] assert_nil s[3] Index: test/mkmf/test_framework.rb =================================================================== --- test/mkmf/test_framework.rb (revision 45312) +++ test/mkmf/test_framework.rb (revision 45313) @@ -36,7 +36,7 @@ class TestMkmf https://github.com/ruby/ruby/blob/trunk/test/mkmf/test_framework.rb#L36 end def test_different_name_header - bug8593 = '[ruby-core:55745] [Bug #8593]' + _bug8593 = '[ruby-core:55745] [Bug #8593]' create_framework("MkmfTest", "test_mkmf.h") do |fw, hdrname| assert(!have_framework(fw), MKMFLOG) assert(have_framework([fw, hdrname]), MKMFLOG) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/