Skip to content

Commit 3274038

Browse files
committed
[GR-17077] Thread.report_on_exception should be true by default.
PullRequest: truffleruby/944
2 parents d9f6509 + 0fc5db7 commit 3274038

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Compatibility:
1313
* `FFI::Struct#[]=` is now supported for inline character arrays.
1414
* `blocking: true` is now supported for `FFI::Library#attach_function`.
1515
* Implemented `Proc#>>` and `#<<` (#1688).
16+
* `Thread.report_on_exception` is now `true` by default like MRI 2.5+.
1617

1718
Changes:
1819

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
slow:Thread.report_on_exception defaults to false
2-
fails:Thread.report_on_exception defaults to true
3-
fails:Thread#report_on_exception returns true for the main Thread
2+
slow:Thread.report_on_exception defaults to true

src/main/java/org/truffleruby/core/thread/ThreadManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ private static void setException(RubyContext context, DynamicObject thread, Dyna
293293
if (thread != mainThread) {
294294
final boolean isSystemExit = Layouts.BASIC_OBJECT.getLogicalClass(exception) == context.getCoreLibrary().getSystemExitClass();
295295

296-
if (!isSystemExit && (boolean) ReadObjectFieldNode.read(thread, "@report_on_exception", false)) {
296+
if (!isSystemExit && (boolean) ReadObjectFieldNode.read(thread, "@report_on_exception", true)) {
297297
context.send(context.getCoreLibrary().getTruffleThreadOperationsModule(),
298298
"report_exception",
299299
thread,

src/main/ruby/truffleruby/core/thread.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def self.handle_interrupt(config, &block)
202202
end
203203

204204
@abort_on_exception = false
205-
@report_on_exception = false
205+
@report_on_exception = true
206206

207207
class << self
208208
attr_accessor :abort_on_exception, :report_on_exception

0 commit comments

Comments
 (0)