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

ruby-changes:30370

From: usa <ko1@a...>
Date: Thu, 8 Aug 2013 15:42:12 +0900 (JST)
Subject: [ruby-changes:30370] usa:r42439 (trunk): * test/coverage/test_coverage.rb (TestCoverage#test_big_code): use `1'

usa	2013-08-08 15:42:05 +0900 (Thu, 08 Aug 2013)

  New Revision: 42439

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

  Log:
    * test/coverage/test_coverage.rb (TestCoverage#test_big_code): use `1'
      instead of `p' to get rid of a side effect.
      Kernel#p without any argument seems to do nothing, but flushes stdout.
      and, if stdout is redirected to file, fsync() will be called on
      Windows.  so, when running test-all on Windows with redirection, such
      as CI environment, this test took a lot of time.

  Modified files:
    trunk/ChangeLog
    trunk/test/coverage/test_coverage.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42438)
+++ ChangeLog	(revision 42439)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Aug  8 15:37:53 2013  NAKAMURA Usaku  <usa@r...>
+
+	* test/coverage/test_coverage.rb (TestCoverage#test_big_code): use `1'
+	  instead of `p' to get rid of a side effect.
+	  Kernel#p without any argument seems to do nothing, but flushes stdout.
+	  and, if stdout is redirected to file, fsync() will be called on
+	  Windows.  so, when running test-all on Windows with redirection, such
+	  as CI environment, this test took a lot of time.
+
 Thu Aug  8 14:54:18 2013  Shugo Maeda  <shugo@r...>
 
 	* NEWS: add description of incompatibility introduced by r42396.
Index: test/coverage/test_coverage.rb
===================================================================
--- test/coverage/test_coverage.rb	(revision 42438)
+++ test/coverage/test_coverage.rb	(revision 42439)
@@ -47,7 +47,7 @@ class TestCoverage < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/coverage/test_coverage.rb#L47
     Dir.mktmpdir {|tmp|
       Dir.chdir(tmp) {
         File.open("test.rb", "w") do |f|
-          f.puts "p\n" * 10000
+          f.puts "1\n" * 10000
           f.puts "def ignore(x); end"
           f.puts "ignore([1"
           f.puts "])"

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

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