ruby-changes:29020
From: nagachika <ko1@a...>
Date: Wed, 5 Jun 2013 00:35:17 +0900 (JST)
Subject: [ruby-changes:29020] nagachika:r41072 (ruby_2_0_0): merge revision(s) 39899:
nagachika 2013-06-05 00:34:55 +0900 (Wed, 05 Jun 2013) New Revision: 41072 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41072 Log: merge revision(s) 39899: * test/ruby/test_require.rb: Remove temporally files in the tests. * test/ruby/test_rubyoptions.rb: Ditto. * test/logger/test_logger.rb: Ditto. * test/psych/test_psych.rb: Ditto. * test/readline/test_readline.rb: Ditto. * test/syslog/test_syslog_logger.rb: Ditto. * test/webrick/test_httpauth.rb: Ditto. * test/zlib/test_zlib.rb: Ditto. Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/test/logger/test_logger.rb branches/ruby_2_0_0/test/psych/test_psych.rb branches/ruby_2_0_0/test/readline/test_readline.rb branches/ruby_2_0_0/test/ruby/test_require.rb branches/ruby_2_0_0/test/ruby/test_rubyoptions.rb branches/ruby_2_0_0/test/syslog/test_syslog_logger.rb branches/ruby_2_0_0/test/webrick/test_httpauth.rb branches/ruby_2_0_0/test/zlib/test_zlib.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 41071) +++ ruby_2_0_0/ChangeLog (revision 41072) @@ -1,3 +1,21 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Wed Jun 5 00:32:18 2013 Tanaka Akira <akr@f...> + + * test/ruby/test_require.rb: Remove temporally files in the tests. + + * test/ruby/test_rubyoptions.rb: Ditto. + + * test/logger/test_logger.rb: Ditto. + + * test/psych/test_psych.rb: Ditto. + + * test/readline/test_readline.rb: Ditto. + + * test/syslog/test_syslog_logger.rb: Ditto. + + * test/webrick/test_httpauth.rb: Ditto. + + * test/zlib/test_zlib.rb: Ditto. + Wed Jun 5 00:08:55 2013 Yusuke Endoh <mame@t...> * dir.c (bracket): fix copy-paste error. When the first and last Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 41071) +++ ruby_2_0_0/version.h (revision 41072) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-06-05" -#define RUBY_PATCHLEVEL 206 +#define RUBY_PATCHLEVEL 207 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 6 Index: ruby_2_0_0/test/logger/test_logger.rb =================================================================== --- ruby_2_0_0/test/logger/test_logger.rb (revision 41071) +++ ruby_2_0_0/test/logger/test_logger.rb (revision 41072) @@ -46,7 +46,7 @@ class TestLogger < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/logger/test_logger.rb#L46 logger.__send__(msg_id, *arg, &block) logdev.open msg = logdev.read - logdev.close + logdev.close(true) msg end Index: ruby_2_0_0/test/syslog/test_syslog_logger.rb =================================================================== --- ruby_2_0_0/test/syslog/test_syslog_logger.rb (revision 41071) +++ ruby_2_0_0/test/syslog/test_syslog_logger.rb (revision 41072) @@ -85,7 +85,7 @@ class TestSyslogRootLogger < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/syslog/test_syslog_logger.rb#L85 assert_equal true, @logger.__send__(msg_id, *arg, &block) logdev.open msg = logdev.read - logdev.close + logdev.close(true) msg end Index: ruby_2_0_0/test/ruby/test_require.rb =================================================================== --- ruby_2_0_0/test/ruby/test_require.rb (revision 41071) +++ ruby_2_0_0/test/ruby/test_require.rb (revision 41072) @@ -26,6 +26,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_require.rb#L26 p :ok end INPUT + t.close(true) end def test_require_too_long_filename @@ -124,6 +125,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_require.rb#L125 ensure env_rubypath ? ENV["RUBYPATH"] = env_rubypath : ENV.delete("RUBYPATH") env_home ? ENV["HOME"] = env_home : ENV.delete("HOME") + t.close(true) end def test_require_with_unc @@ -281,6 +283,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_require.rb#L283 INPUT assert_raise(ArgumentError) { at_exit } + t.close(true) end def test_load2 # [ruby-core:25039] @@ -294,6 +297,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_require.rb#L297 assert_in_out_err([], <<-INPUT, %w("hello"), []) load(#{ t.path.dump }, true) INPUT + t.close(true) end def test_tainted_loadpath @@ -343,6 +347,8 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_require.rb#L347 require "#{ file }" p :ok INPUT + + t.close(true) end def test_relative Index: ruby_2_0_0/test/ruby/test_rubyoptions.rb =================================================================== --- ruby_2_0_0/test/ruby/test_rubyoptions.rb (revision 41071) +++ ruby_2_0_0/test/ruby/test_rubyoptions.rb (revision 41072) @@ -524,7 +524,7 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_rubyoptions.rb#L524 t.flush assert_in_out_err(["-e", "$0=ARGV[0]; Process.kill :SEGV, $$", t.path], "", [], expected_stderr, bug7597, opts) - t.close + t.close(true) end def test_DATA Index: ruby_2_0_0/test/zlib/test_zlib.rb =================================================================== --- ruby_2_0_0/test/zlib/test_zlib.rb (revision 41071) +++ ruby_2_0_0/test/zlib/test_zlib.rb (revision 41072) @@ -439,6 +439,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L439 Zlib::GzipReader.open(t.path) do |f| assert_kind_of(IO, f.to_io) end + t.close(true) end def test_crc @@ -450,6 +451,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L451 f.read assert_equal(0x8c736521, f.crc) end + t.close(true) end def test_mtime @@ -468,6 +470,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L470 Zlib::GzipReader.open(t.path) do |f| assert_equal(tim.to_i, f.mtime.to_i) end + t.close(true) end def test_level @@ -478,6 +481,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L481 Zlib::GzipReader.open(t.path) do |f| assert_equal(Zlib::DEFAULT_COMPRESSION, f.level) end + t.close(true) end def test_os_code @@ -488,6 +492,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L492 Zlib::GzipReader.open(t.path) do |f| assert_equal(Zlib::OS_CODE, f.os_code) end + t.close(true) end def test_orig_name @@ -503,6 +508,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L508 Zlib::GzipReader.open(t.path) do |f| assert_equal("foobarbazqux", f.orig_name) end + t.close(true) end def test_comment @@ -518,6 +524,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L524 Zlib::GzipReader.open(t.path) do |f| assert_equal("foobarbazqux", f.comment) end + t.close(true) end def test_lineno @@ -532,6 +539,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L539 assert_equal([1000, "baz\n"], [f.lineno, f.gets]) assert_equal([1001, "qux\n"], [f.lineno, f.gets]) end + t.close(true) end def test_closed_p @@ -546,6 +554,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L554 f.close assert_equal(true, f.closed?) end + t.close(true) end def test_sync @@ -560,6 +569,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L569 f.sync = false assert_equal(false, f.sync) end + t.close(true) end def test_pos @@ -570,6 +580,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L580 gz.flush assert_equal(3, gz.tell) end + t.close(true) end def test_path @@ -599,6 +610,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L610 Zlib::GzipReader.new(sio) do |f| assert_raise(NoMethodError) { f.path } end + t.close(true) end end @@ -670,6 +682,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L682 ensure f.close end + t.close(true) end def test_rewind @@ -682,6 +695,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L695 f.rewind assert_equal("foo", f.read) end + t.close(true) end def test_unused @@ -696,6 +710,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L710 assert_equal("bar", f.read) assert_equal(nil, f.unused) end + t.close(true) end def test_unused2 @@ -735,6 +750,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L750 assert_raise(ArgumentError) { f.read(-1) } assert_equal(str, f.read) end + t.close(true) end def test_readpartial @@ -753,6 +769,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L769 assert_raise(ArgumentError) { f.readpartial(-1) } end + t.close(true) end def test_getc @@ -764,6 +781,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L781 "foobar".each_char {|c| assert_equal(c, f.getc) } assert_nil(f.getc) end + t.close(true) end def test_getbyte @@ -775,6 +793,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L793 "foobar".each_byte {|c| assert_equal(c, f.getbyte) } assert_nil(f.getbyte) end + t.close(true) end def test_readchar @@ -786,6 +805,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L805 "foobar".each_byte {|c| assert_equal(c, f.readchar.ord) } assert_raise(EOFError) { f.readchar } end + t.close(true) end def test_each_byte @@ -798,6 +818,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L818 f.each_byte {|c| a << c } assert_equal("foobar".each_byte.to_a, a) end + t.close(true) end def test_gets @@ -823,6 +844,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L844 assert_equal("az\n", f.gets(nil, 10)) assert_nil(f.gets) end + t.close(true) end def test_gets2 @@ -849,6 +871,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L871 assert_equal(ustrs[2][1..-1], f.gets(nil, 20)) assert_nil(f.gets) end + t.close(true) end def test_readline @@ -862,6 +885,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L885 assert_equal("baz\n", f.readline) assert_raise(EOFError) { f.readline } end + t.close(true) end def test_each @@ -873,6 +897,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L897 a = ["foo\n", "bar\n", "baz\n"] f.each {|l| assert_equal(a.shift, l) } end + t.close(true) end def test_readlines @@ -883,6 +908,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L908 Zlib::GzipReader.open(t.path) do |f| assert_equal(["foo\n", "bar\n", "baz\n"], f.readlines) end + t.close(true) end def test_reader_wrap @@ -893,6 +919,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L919 f.binmode assert_equal("foo", Zlib::GzipReader.wrap(f) {|gz| gz.read }) assert_raise(IOError) { f.close } + t.close(true) end def test_corrupted_header @@ -923,6 +950,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L950 read_size = Zlib::GzipReader.open(t.path) {|gz| gz.read(1024) } assert_equal(Encoding::ASCII_8BIT, read_size.encoding) assert_equal(content, read_size) + t.close(true) end end @@ -951,6 +979,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L979 assert_equal("bar", Zlib::GzipReader.open(t.path) {|gz| gz.read }) assert_raise(Zlib::StreamError) { Zlib::GzipWriter.open(t.path, 10000) } + t.close(true) end def test_write @@ -963,6 +992,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L992 def o.to_s; "bar"; end Zlib::GzipWriter.open(t.path) {|gz| gz.print(o) } assert_equal("bar", Zlib::GzipReader.open(t.path) {|gz| gz.read }) + t.close(true) end def test_putc @@ -972,6 +1002,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L1002 assert_equal("x", Zlib::GzipReader.open(t.path) {|gz| gz.read }) # todo: multibyte char + t.close(true) end def test_writer_wrap @@ -980,6 +1011,7 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/zlib/test_zlib.rb#L1011 Zlib::GzipWriter.wrap(t) {|gz| gz.print("foo") } t.close assert_equal("foo", Zlib::GzipReader.open(t.path) {|gz| gz.read }) + t.close(true) end end Index: ruby_2_0_0/test/webrick/test_httpauth.rb =================================================================== --- ruby_2_0_0/test/webrick/test_httpauth.rb (revision 41071) +++ ruby_2_0_0/test/webrick/test_httpauth.rb (revision 41072) @@ -59,6 +59,7 @@ class TestWEBrickHTTPAuth < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/webrick/test_httpauth.rb#L59 http.request(g){|res| assert_equal("hoge", res.body, log.call)} g.basic_auth("webrick", "not super") http.request(g){|res| assert_not_equal("hoge", res.body, log.call)} + tmpfile.close(true) } end @@ -140,6 +141,7 @@ class TestWEBrickHTTPAuth < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/webrick/test_httpauth.rb#L141 g['Authorization'] = credentials_for_request('webrick', "not super", params) http.request(g){|res| assert_not_equal("hoge", res.body, log.call)} end + tmpfile.close(true) } end Index: ruby_2_0_0/test/readline/test_readline.rb =================================================================== --- ruby_2_0_0/test/readline/test_readline.rb (revision 41071) +++ ruby_2_0_0/test/readline/test_readline.rb (revision 41072) @@ -396,6 +396,8 @@ class TestReadline < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/readline/test_readline.rb#L396 Readline.pre_input_hook = nil rescue NotImplementedError end + stdin.close(true) + stdout.close(true) end end if !/EditLine|\A4\.3\z/n.match(Readline::VERSION) Index: ruby_2_0_0/test/psych/test_psych.rb =================================================================== --- ruby_2_0_0/test/psych/test_psych.rb (revision 41071) +++ ruby_2_0_0/test/psych/test_psych.rb (revision 41072) @@ -68,6 +68,7 @@ class TestPsych < Psych::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/psych/test_psych.rb#L68 assert_equal io, Psych.dump(hash, io) io.rewind assert_equal Psych.dump(hash), io.read + io.close(true) end end Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r39899 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/