ruby-changes:37963
From: nagachika <ko1@a...>
Date: Sun, 22 Mar 2015 04:35:30 +0900 (JST)
Subject: [ruby-changes:37963] nagachika:r50044 (ruby_2_1): merge revision(s) r44681: [Backport #9440]
nagachika 2015-03-22 04:35:06 +0900 (Sun, 22 Mar 2015) New Revision: 50044 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50044 Log: 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] Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/ext/thread/thread.c branches/ruby_2_1/test/thread/test_cv.rb branches/ruby_2_1/test/thread/test_queue.rb branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 50043) +++ ruby_2_1/ChangeLog (revision 50044) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Sun Mar 22 04:15:39 2015 Nobuyoshi Nakada <nobu@r...> + + * ext/thread/thread.c (Init_thread): ConditionVariable and Queue + are not able to copy. [ruby-core:59961] [Bug #9440] + Wed Mar 18 02:42:37 2015 NAKAMURA Usaku <usa@r...> * win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also Index: ruby_2_1/ext/thread/thread.c =================================================================== --- ruby_2_1/ext/thread/thread.c (revision 50043) +++ ruby_2_1/ext/thread/thread.c (revision 50044) @@ -590,12 +590,14 @@ Init_thread(void) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/thread/thread.c#L590 rb_define_method(rb_cConditionVariable, "initialize", rb_condvar_initialize, 0); rb_define_method(rb_cConditionVariable, "marshal_dump", undumpable, 0); + rb_undef_method(rb_cConditionVariable, "initialize_copy"); rb_define_method(rb_cConditionVariable, "wait", rb_condvar_wait, -1); rb_define_method(rb_cConditionVariable, "signal", rb_condvar_signal, 0); rb_define_method(rb_cConditionVariable, "broadcast", rb_condvar_broadcast, 0); rb_define_method(rb_cQueue, "initialize", rb_queue_initialize, 0); rb_define_method(rb_cQueue, "marshal_dump", undumpable, 0); + rb_undef_method(rb_cQueue, "initialize_copy"); rb_define_method(rb_cQueue, "push", rb_queue_push, 1); rb_define_method(rb_cQueue, "pop", rb_queue_pop, -1); rb_define_method(rb_cQueue, "empty?", rb_queue_empty_p, 0); Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 50043) +++ ruby_2_1/version.h (revision 50044) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.5" -#define RUBY_RELEASE_DATE "2015-03-18" -#define RUBY_PATCHLEVEL 319 +#define RUBY_RELEASE_DATE "2015-03-22" +#define RUBY_PATCHLEVEL 320 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 18 +#define RUBY_RELEASE_DAY 22 #include "ruby/version.h" Index: ruby_2_1/test/thread/test_queue.rb =================================================================== --- ruby_2_1/test/thread/test_queue.rb (revision 50043) +++ ruby_2_1/test/thread/test_queue.rb (revision 50044) @@ -220,6 +220,14 @@ class TestQueue < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/thread/test_queue.rb#L220 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 Index: ruby_2_1/test/thread/test_cv.rb =================================================================== --- ruby_2_1/test/thread/test_cv.rb (revision 50043) +++ ruby_2_1/test/thread/test_cv.rb (revision 50044) @@ -195,6 +195,14 @@ INPUT https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/thread/test_cv.rb#L195 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 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44681 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/