summaryrefslogtreecommitdiff
path: root/test/irb/test_raise_no_backtrace_exception.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/irb/test_raise_no_backtrace_exception.rb')
-rw-r--r--test/irb/test_raise_no_backtrace_exception.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/irb/test_raise_no_backtrace_exception.rb b/test/irb/test_raise_no_backtrace_exception.rb
index 699990f..9babc29 100644
--- a/test/irb/test_raise_no_backtrace_exception.rb
+++ b/test/irb/test_raise_no_backtrace_exception.rb
@@ -13,5 +13,13 @@ module TestIRB
raise e
IRB
end
+
+ def test_raise_exception_with_invalid_byte_sequence
+ skip if RUBY_ENGINE == 'truffleruby'
+ bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
+ assert_in_out_err(bundle_exec + %w[-rirb -W0 -e IRB.start(__FILE__) -- -f --], <<~IRB, /StandardError \(A\\xF3B\)/, [])
+ raise StandardError, "A\\xf3B"
+ IRB
+ end
end
end