[前][次][番号順一覧][スレッド一覧]

ruby-changes:28000

From: usa <ko1@a...>
Date: Tue, 2 Apr 2013 13:03:03 +0900 (JST)
Subject: [ruby-changes:28000] usa:r40052 (ruby_1_9_3): merge revision(s) 33365: [Backport #8106]

usa	2013-04-02 13:00:53 +0900 (Tue, 02 Apr 2013)

  New Revision: 40052

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40052

  Log:
    merge revision(s) 33365: [Backport #8106]
    
    * test/ruby/test_bignum.rb (TestBignum#test_interrupt): fix for
      faster CPU.

  Modified directories:
    branches/ruby_1_9_3/
  Modified files:
    branches/ruby_1_9_3/test/ruby/test_bignum.rb
    branches/ruby_1_9_3/version.h

Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 40051)
+++ ruby_1_9_3/version.h	(revision 40052)
@@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 403
+#define RUBY_PATCHLEVEL 404
 
 #define RUBY_RELEASE_DATE "2013-04-02"
 #define RUBY_RELEASE_YEAR 2013
Index: ruby_1_9_3/test/ruby/test_bignum.rb
===================================================================
--- ruby_1_9_3/test/ruby/test_bignum.rb	(revision 40051)
+++ ruby_1_9_3/test/ruby/test_bignum.rb	(revision 40052)
@@ -491,7 +491,7 @@ class TestBignum < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/ruby/test_bignum.rb#L491
     assert_equal(true, (2**32).even?)
   end
 
-  def interrupt
+  def assert_interrupt
     time = Time.now
     start_flag = false
     end_flag = false
@@ -500,14 +500,16 @@ class TestBignum < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/test/ruby/test_bignum.rb#L500
       yield
       end_flag = true
     end
-    sleep 1
+    Thread.pass until start_flag
     thread.raise
     thread.join rescue nil
-    start_flag && !end_flag && Time.now - time < 10
+    time = Time.now - time
+    assert_equal([true, false], [start_flag, end_flag])
+    assert_operator(time, :<, 10)
   end
 
   def test_interrupt
-    assert(interrupt { (65536 ** 65536).to_s })
+    assert_interrupt {(65536 ** 65536).to_s}
   end
 
   def test_too_big_to_s

Property changes on: ruby_1_9_3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r33365


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]