diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-11-30 21:26:52 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-11-30 21:26:52 +0100 |
commit | 1243255c3a36433041012b6107a5ac48658a0895 (patch) | |
tree | 04440f84b48999ff08d4a2a16d066d0ad731400e /spec/ruby/core/exception/backtrace_spec.rb | |
parent | ab8345271eb87ff155d8bd5f22f53a4cf2902c26 (diff) | |
download | ruby-1243255c3a36433041012b6107a5ac48658a0895.tar.gz |
Update to ruby/spec@4eec3dc
Diffstat (limited to 'spec/ruby/core/exception/backtrace_spec.rb')
-rw-r--r-- | spec/ruby/core/exception/backtrace_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/ruby/core/exception/backtrace_spec.rb b/spec/ruby/core/exception/backtrace_spec.rb index 5e140f8d9b..2d6825180a 100644 --- a/spec/ruby/core/exception/backtrace_spec.rb +++ b/spec/ruby/core/exception/backtrace_spec.rb @@ -47,7 +47,7 @@ describe "Exception#backtrace" do end end - it "produces a backtrace for an exception captured using $!" do + it "captures the backtrace for an exception into $!" do exception = begin raise rescue RuntimeError @@ -57,6 +57,16 @@ describe "Exception#backtrace" do exception.backtrace.first.should =~ /backtrace_spec/ end + it "captures the backtrace for an exception into $@" do + backtrace = begin + raise + rescue RuntimeError + $@ + end + + backtrace.first.should =~ /backtrace_spec/ + end + it "returns an Array that can be updated" do begin raise |