summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/backtrace_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/exception/backtrace_spec.rb')
-rw-r--r--spec/ruby/core/exception/backtrace_spec.rb12
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