ruby-changes:20123
From: sorah <ko1@a...>
Date: Sun, 19 Jun 2011 10:12:13 +0900 (JST)
Subject: [ruby-changes:20123] sorah:r32171 (trunk): * lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker?
sorah 2011-06-19 10:12:02 +0900 (Sun, 19 Jun 2011) New Revision: 32171 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32171 Log: * lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker? only when $0 == __FILE__. * lib/test/unit/parallel.rb: Run Test::Unit::Worker.run only when $0 == __FILE__. Modified files: trunk/ChangeLog trunk/lib/test/unit/parallel.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32170) +++ ChangeLog (revision 32171) @@ -1,3 +1,11 @@ +Sun Jun 19 10:05:16 2011 Shota Fukumori <sorah@t...> + + * lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker? + only when $0 == __FILE__. + + * lib/test/unit/parallel.rb: Run Test::Unit::Worker.run only when + $0 == __FILE__. + Sat Jun 18 23:59:24 2011 Nobuyoshi Nakada <nobu@r...> * io.c (fill_cbuf): finish reading at EOF, and the readconv has Index: lib/test/unit/parallel.rb =================================================================== --- lib/test/unit/parallel.rb (revision 32170) +++ lib/test/unit/parallel.rb (revision 32171) @@ -2,12 +2,6 @@ module Test module Unit - class TestCase < MiniTest::Unit::TestCase - def on_parallel_worker? - true - end - end - class Worker < Runner class << self undef autorun @@ -148,4 +142,16 @@ end end -Test::Unit::Worker.new.run(ARGV) +if $0 == __FILE__ + module Test + module Unit + class TestCase < MiniTest::Unit::TestCase + def on_parallel_worker? + true + end + end + end + end + + Test::Unit::Worker.new.run(ARGV) +end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/