aboutsummaryrefslogtreecommitdiffstats
path: root/test/irb
diff options
context:
space:
mode:
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_raise_no_backtrace_exception.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/irb/test_raise_no_backtrace_exception.rb b/test/irb/test_raise_no_backtrace_exception.rb
new file mode 100644
index 0000000000..e8204d7a1b
--- /dev/null
+++ b/test/irb/test_raise_no_backtrace_exception.rb
@@ -0,0 +1,14 @@
+require 'test/unit'
+require_relative '../ruby/envutil'
+
+module TestIRB
+ class TestRaiseNoBacktraceException < Test::Unit::TestCase
+ def test_raise_exception
+ status = assert_in_out_err(%w[-rirb -e IRB.start(__FILE__) -- -f --], <<-IRB, /Exception: foo/, [])
+ e = Exception.new("foo")
+ def e.backtrace; nil; end
+ raise e
+IRB
+ end
+ end
+end