diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-17 02:31:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-17 02:31:35 +0000 |
commit | e601e775905f356f897857759c479d5ab76b2286 (patch) | |
tree | ccaa98da5509c2fd002552b13e7cfb7973f4fa69 /thread.c | |
parent | e97ac02f8466275732a33f704480c03da722f485 (diff) | |
download | ruby-e601e775905f356f897857759c479d5ab76b2286.tar.gz |
eval.c: copy special exceptions before raise
* eval.c (setup_exception): consider if the exception is frozen,
but not one of special exception objects.
* gc.c (rb_memerror): copy minimum objects.
* thread.c (rb_threadptr_execute_interrupts): prepare special
exception queued by another thread to be raised.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2071,6 +2071,10 @@ rb_threadptr_execute_interrupts(rb_thread_t *th, int blocking_timing) rb_threadptr_to_kill(th); } else { + if (err == th->vm->special_exceptions[ruby_error_stream_closed]) { + /* the only special exception to be queued accross thread */ + err = ruby_vm_special_exception_copy(err); + } /* set runnable if th was slept. */ if (th->status == THREAD_STOPPED || th->status == THREAD_STOPPED_FOREVER) |