diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-21 19:35:06 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-21 19:35:06 +0000 |
commit | 410699b90e2bb1d2ac2c0d49c204d2576d8335a1 (patch) | |
tree | 8fcc308582d82a660721b377b90d2e5688f3206a /test | |
parent | c7edfc37fff5a1b6636e6582a882419cc32942c9 (diff) |
merge revision(s) r44681: [Backport #9440]
* 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/branches/ruby_2_1@50044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/thread/test_cv.rb | 8 | ||||
-rw-r--r-- | test/thread/test_queue.rb | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/thread/test_cv.rb b/test/thread/test_cv.rb index 08459a0a04..53f3261390 100644 --- a/test/thread/test_cv.rb +++ b/test/thread/test_cv.rb @@ -195,6 +195,14 @@ 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 + (DumpableCV = ConditionVariable.dup).class_eval {remove_method :marshal_dump} def test_dump diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb index 314ee98dab..c33cb6dc8a 100644 --- a/test/thread/test_queue.rb +++ b/test/thread/test_queue.rb @@ -220,6 +220,14 @@ class TestQueue < Test::Unit::TestCase end end + def test_dup + bug9440 = '[ruby-core:59961] [Bug #9440]' + q = Queue.new + assert_raise(NoMethodError, bug9440) do + q.dup + end + end + (DumpableQueue = Queue.dup).class_eval {remove_method :marshal_dump} def test_dump |