From 06d2e8aaf7fe60a09245963f2f69feb5685db8f0 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 22 Jan 2014 06:59:41 +0000 Subject: thread/thread.c: no dup * ext/thread/thread.c (Init_thread): ConditionVariable and Queue are not able to copy. [ruby-core:59961] [Bug #9440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/thread/test_cv.rb | 8 ++++++++ test/thread/test_queue.rb | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'test/thread') diff --git a/test/thread/test_cv.rb b/test/thread/test_cv.rb index 9a9b407a5b..92179e8e45 100644 --- a/test/thread/test_cv.rb +++ b/test/thread/test_cv.rb @@ -188,4 +188,12 @@ INPUT assert_nothing_raised(Exception) { mutex.synchronize {condvar.broadcast} } end + + def test_dup + bug9440 = '[ruby-core:59961] [Bug #9440]' + condvar = ConditionVariable.new + assert_raise(NoMethodError, bug9440) do + condvar.dup + end + end end diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb index bf8344fade..07a611ddd2 100644 --- a/test/thread/test_queue.rb +++ b/test/thread/test_queue.rb @@ -200,4 +200,12 @@ class TestQueue < Test::Unit::TestCase timeout(1) { th2.join } end end + + def test_dup + bug9440 = '[ruby-core:59961] [Bug #9440]' + q = Queue.new + assert_raise(NoMethodError, bug9440) do + q.dup + end + end end -- cgit v1.2.3