summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-17 22:34:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-17 22:34:03 +0000
commit610b2f96e38bf8eb72891a096515a7ace3ddb3bc (patch)
tree4ad704283e7b68d706249e641984ee9ec659433a /test
parent0d5ed3d2ad67e8c50f23f509af8a66a744258dfb (diff)
* test/ruby/test_signal.rb (TestSignal#test_signal_requiring): use
in-process signal to get rid of limitation of Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_signal.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb
index 94f527f277..c226fdd611 100644
--- a/test/ruby/test_signal.rb
+++ b/test/ruby/test_signal.rb
@@ -198,7 +198,6 @@ class TestSignal < Test::Unit::TestCase
end
def test_signal_requiring
- skip "limitation of GenerateConsoleCtrlEvent()" if /mswin|mingw/ =~ RUBY_PLATFORM
t = Tempfile.new(%w"require_ensure_test .rb")
t.puts "sleep"
t.close
@@ -209,14 +208,13 @@ th = Thread.new do
require ARGV[0]
ensure
Marshal.dump($!, STDOUT)
+ STDOUT.flush
end
end
-STDOUT.puts
-STDOUT.flush
+Thread.pass while th.running?
+Process.kill(:INT, $$)
th.join
EOS
- child.gets
- Process.kill("INT", child.pid)
Marshal.load(child)
end
t.close!