From 320b49473ee64f37787c514e18577106e8231588 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Dec 2012 04:38:18 +0000 Subject: error.c: rb_write_error_str * error.c (compile_err_append, compile_warn_print, warn_print): use rb_write_error_str() instead of writing to rb_stderr directly. * io.c (rb_write_error_str): a stopgap measure not to unblock GVL. warning from require seems to still have race condition errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_require.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 4279acdde1..410edbb276 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -384,6 +384,12 @@ class TestRequire < Test::Unit::TestCase } tmp.close + # "circular require" warnings to $stderr, but backtraces to stderr + # in C-level. And redirecting stderr to a pipe seems to change + # some blocking timings and causes a deadlock, so run in a + # separated process for the time being. + assert_separately(["-w", "-", path, bug5754], <<-'end;') + path, bug5754 = *ARGV start = false scratch = [] @@ -416,6 +422,7 @@ class TestRequire < Test::Unit::TestCase assert_equal(true, (t1_res ^ t2_res), bug5754 + " t1:#{t1_res} t2:#{t2_res}") assert_equal([:pre, :post], scratch, bug5754) + end; ensure $".delete(path) tmp.close(true) if tmp -- cgit v1.2.3