diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb index 685b41a54f..1dfcd075fa 100644 --- a/test/thread/test_queue.rb +++ b/test/thread/test_queue.rb @@ -1,5 +1,6 @@ require 'test/unit' require 'thread' +require_relative '../ruby/envutil' class TestQueue < Test::Unit::TestCase def test_queue @@ -53,4 +54,20 @@ class TestQueue < Test::Unit::TestCase assert_raise(ArgumentError) { q.max = -1 } assert_equal(1, q.max) end + + def test_thr_kill + bug5343 = '[ruby-core:39634]' + assert_normal_exit(<<-'_eom', bug5343) + require "thread" + queue = Queue.new + r, w = IO.pipe + th = Thread.start { + queue.push(nil) + r.read 1 + } + queue.pop + th.kill.join + _eom + end + end