summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/thread/report_on_exception_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/thread/report_on_exception_spec.rb b/spec/ruby/core/thread/report_on_exception_spec.rb
index 74b7984a32..d8400c080a 100644
--- a/spec/ruby/core/thread/report_on_exception_spec.rb
+++ b/spec/ruby/core/thread/report_on_exception_spec.rb
@@ -34,6 +34,16 @@ ruby_version_is "2.4" do
end
describe "Thread#report_on_exception" do
+ ruby_version_is "2.5" do
+ it "returns true for the main Thread" do
+ Thread.current.report_on_exception.should == true
+ end
+
+ it "returns true for new Threads" do
+ Thread.new { Thread.current.report_on_exception }.value.should == true
+ end
+ end
+
it "returns whether the Thread will print a backtrace if it exits with an exception" do
t = Thread.new { Thread.current.report_on_exception = true }
t.join