summaryrefslogtreecommitdiff
path: root/test/thread/test_queue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/thread/test_queue.rb')
-rw-r--r--test/thread/test_queue.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb
index 6d527ad68c0..b3662742c12 100644
--- a/test/thread/test_queue.rb
+++ b/test/thread/test_queue.rb
@@ -215,4 +215,17 @@ class TestQueue < Test::Unit::TestCase
q.dup
end
end
+
+ def test_dump
+ bug9674 = '[ruby-core:61677] [Bug #9674]'
+ q = Queue.new
+ assert_raise_with_message(TypeError, /#{Queue}/, bug9674) do
+ Marshal.dump(q)
+ end
+
+ sq = SizedQueue.new(1)
+ assert_raise_with_message(TypeError, /#{SizedQueue}/, bug9674) do
+ Marshal.dump(sq)
+ end
+ end
end