ruby-changes:18300
From: yugui <ko1@a...>
Date: Thu, 23 Dec 2010 21:46:26 +0900 (JST)
Subject: [ruby-changes:18300] Ruby:r30322 (ruby_1_9_2): merges r30284 from trunk into ruby_1_9_2.
yugui 2010-12-23 21:45:53 +0900 (Thu, 23 Dec 2010) New Revision: 30322 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30322 Log: merges r30284 from trunk into ruby_1_9_2. -- * test/rexml/test_contrib.rb (ContribTester#test_pos): should not use fixed path name for tests. [ruby-dev:42827] * test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use fixed port for tests. [ruby-dev:42828] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/test/rexml/test_contrib.rb branches/ruby_1_9_2/test/rexml/test_sax.rb branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 30321) +++ ruby_1_9_2/ChangeLog (revision 30322) @@ -1,3 +1,11 @@ +Tue Dec 21 06:25:43 2010 Nobuyoshi Nakada <nobu@r...> + + * test/rexml/test_contrib.rb (ContribTester#test_pos): should not + use fixed path name for tests. [ruby-dev:42827] + + * test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use + fixed port for tests. [ruby-dev:42828] + Tue Dec 21 01:41:42 2010 Masaya Tarui <tarui@r...> * io.c : add an extra byte to buffer for the specification of read Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 30321) +++ ruby_1_9_2/version.h (revision 30322) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 127 +#define RUBY_PATCHLEVEL 128 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_2/test/rexml/test_contrib.rb =================================================================== --- ruby_1_9_2/test/rexml/test_contrib.rb (revision 30321) +++ ruby_1_9_2/test/rexml/test_contrib.rb (revision 30322) @@ -74,7 +74,7 @@ EOF doc = REXML::Document.new source doc.write(out="") - assert(out[/>'>/] != nil, "Couldn't find >'>") + assert(out[/>\'>/] != nil, "Couldn't find >'>") assert(out[/\]>/] != nil, "Couldn't find ]>") end @@ -512,7 +512,8 @@ end def test_pos - testfile = "/tmp/tidal#{$$}" + require 'tempfile' + testfile = Tempfile.new("tidal") testdata = %Q{<calibration> <section name="parameters"> <param name="barpress">760</param> @@ -521,13 +522,12 @@ </calibration> } - File.open(testfile, 'w') do |f| - f.puts testdata + testfile.puts testdata + testfile.rewind + assert_nothing_raised do + d = REXML::Document.new(testfile) end - File.open(testfile) do |f| - d = REXML::Document.new(f) - end - #File.unlink(testfile) + testfile.close(true) end def test_deep_clone Index: ruby_1_9_2/test/rexml/test_sax.rb =================================================================== --- ruby_1_9_2/test/rexml/test_sax.rb (revision 30321) +++ ruby_1_9_2/test/rexml/test_sax.rb (revision 30322) @@ -221,11 +221,9 @@ def test_socket require 'socket' - port = 12345 + server = TCPServer.new('127.0.0.1', 0) + socket = TCPSocket.new('127.0.0.1', server.addr[1]) - server = TCPServer.new('127.0.0.1', port) - socket = TCPSocket.new('127.0.0.1', port) - ok = false session = server.accept session << '<foo>' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/