diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 18:43:42 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 18:43:42 +0000 |
commit | 5a3c024df0a83d1f64f10f028f1082e67f88c013 (patch) | |
tree | 72d698e12f3c39e6fdc66bd333a8bbebdd62172c /vm.c | |
parent | 2406207cbba15384868255d75dd3b8cb71b60e85 (diff) | |
download | ruby-5a3c024df0a83d1f64f10f028f1082e67f88c013.tar.gz |
Set Thread.report_on_exception=true by default to report exceptions in Threads
* [Feature #14143] [ruby-core:83979]
* vm.c (vm_init2): Set Thread.report_on_exception to true.
* thread.c (thread_start_func_2): Add indication the message is caused
by report_on_exception = true.
* spec/ruby: Specify the new behavior.
* test/ruby/test_thread.rb: Adapt and improve tests for
Thread.report_on_exception and Thread#report_on_exception.
* test/ruby/test_thread.rb, test/ruby/test_exception.rb: Unset
report_on_exception for tests expecting no extra output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2280,6 +2280,7 @@ vm_init2(rb_vm_t *vm) { MEMZERO(vm, rb_vm_t, 1); rb_vm_living_threads_init(vm); + vm->thread_report_on_exception = 1; vm->src_encoding_index = -1; vm_default_params_setup(vm); |