summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/fixtures/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/exception/fixtures/common.rb')
-rw-r--r--spec/ruby/core/exception/fixtures/common.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/ruby/core/exception/fixtures/common.rb b/spec/ruby/core/exception/fixtures/common.rb
index e1ba102197..9ddabace11 100644
--- a/spec/ruby/core/exception/fixtures/common.rb
+++ b/spec/ruby/core/exception/fixtures/common.rb
@@ -4,11 +4,19 @@ module ExceptionSpecs
class Backtrace
def self.backtrace
begin
- raise # Do not move this line or update backtrace_spec.rb
+ raise # If you move this line, update backtrace_spec.rb
rescue RuntimeError => e
e.backtrace
end
end
+
+ def self.backtrace_locations
+ begin
+ raise
+ rescue RuntimeError => e
+ e.backtrace_locations
+ end
+ end
end
class UnExceptional < Exception