1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2011-06-17 22:34:03 +00:00
parent 0d5ed3d2ad
commit 610b2f96e3

View file

@ -198,7 +198,6 @@ class TestSignal < Test::Unit::TestCase
end end
def test_signal_requiring def test_signal_requiring
skip "limitation of GenerateConsoleCtrlEvent()" if /mswin|mingw/ =~ RUBY_PLATFORM
t = Tempfile.new(%w"require_ensure_test .rb") t = Tempfile.new(%w"require_ensure_test .rb")
t.puts "sleep" t.puts "sleep"
t.close t.close
@ -209,14 +208,13 @@ th = Thread.new do
require ARGV[0] require ARGV[0]
ensure ensure
Marshal.dump($!, STDOUT) Marshal.dump($!, STDOUT)
STDOUT.flush
end end
end end
STDOUT.puts Thread.pass while th.running?
STDOUT.flush Process.kill(:INT, $$)
th.join th.join
EOS EOS
child.gets
Process.kill("INT", child.pid)
Marshal.load(child) Marshal.load(child)
end end
t.close! t.close!