[Bug #2405] Test::Unit.run$B$N>r7oH=Dj$,5U(B?

Bug #2405: Test::Unit.rune$B$N>r7oH=Dj$,5Ue(B?
http://redmine.ruby-lang.org/issues/show/2405

e$B5/I<<Te(B: Sho H.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.8.7 (2008-08-11 patchlevel 72)

Test::Unit.rune$B$Ke(Btruee$B$rBeF~$9$k$H!"C1BN%F%9%H$,<+F0<B9T$5$l$^$;$s!#e(B

test/unit.rbe$B$K$O0J2<$N$h$&$J@bL@$,$"$k$N$G!“e(Btruee$B$rBeF~$7$?;~$K<+F0<B9Te(B
e$B$7$?$$$H$$$&0U?^$,$”$k$H9M$($^$7$?!#$I$A$i$,@5$7$$$N$G$7$g$&$+e(B?

Automatically run tests at exit?

def self.run?
@run ||= false
end

e$B$b$7IT6q9g$J$i!"0J2<$N$h$&$J=$@5$K$J$k$H9M$($F$$$^$9!#e(B

— unit.rb 2007-02-13 08:01:19.000000000 +0900
+++ unit.rb 2009-11-26 18:18:01.000000000 +0900
@@ -268,13 +268,13 @@

   # Automatically run tests at exit?
   def self.run?
  •  @run ||= false
    
  •  @run ||= true
    
    end
    end
    end

at_exit do

  • unless $! || Test::Unit.run?
  • if $!.nil? && Test::Unit.run?
    exit Test::Unit::AutoRunner.run
    end
    end

e$B%A%1%C%He(B #2405 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%+%F%4%je(B libe$B$K%;%C%He(B
e$B%9%F!<%?%9e(B Opene$B$+$ie(BAssignede$B$KJQ99e(B
e$BC4Ev<Te(B Shyouhei U.e$B$K%;%C%He(B

e$B%I%-%e%a%s%H$N8m$j$G$9!#$3$Ne(Brune$B$O2a5nJ,;l$J$N$G$7$g$&!#e(B

http://redmine.ruby-lang.org/issues/show/2405