Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweak the example

  • Loading branch information...
commit 6e4eb27545ae39ee8f65dda5313a4fa5aaf5133e 1 parent feb3c0a
Darrick Wiebe authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 examples/example.rb
View
9 examples/example.rb
@@ -44,12 +44,15 @@ def double_bug
elsif ARGV.first == 'nested'
require 'nested_exceptions/global'
- puts "Nested exception:"
begin
example.double_bug
rescue StandardError => e
- puts "Note that JRuby does not display the modified backtrace:"
- pp e.backtrace
+ if Object.const_defined? :RUBY_ENGINE and (RUBY_ENGINE == 'jruby' or RUBY_ENGINE == 'rbx')
+ puts "Note that JRuby and Rubinius do not display the modified backtrace:"
+ pp e.backtrace
+ puts
+ end
+ puts "Nested exception:"
raise
end
Please sign in to comment.
Something went wrong with that request. Please try again.