summaryrefslogtreecommitdiff
path: root/test/ruby/test_require.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-30 15:13:58 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-30 15:13:58 +0900
commitb5c74d548872388921402ff2db36be15e924a89b (patch)
tree638bd490bdb6e3c89086a6c040674d3b399fc693 /test/ruby/test_require.rb
parentdfad14d83f1a51a537d03da285b71e9d87a6da7f (diff)
Ease the `Encoding::CompatibilityError` test failure
At the time this test first started using `assert_raise_with_message`, it did not touch `Encoding.default_internal`.
Diffstat (limited to 'test/ruby/test_require.rb')
-rw-r--r--test/ruby/test_require.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 60e5b0f8b1..e124498531 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -52,7 +52,8 @@ class TestRequire < Test::Unit::TestCase
def test_require_nonascii
bug3758 = '[ruby-core:31915]'
["\u{221e}", "\x82\xa0".force_encoding("cp932")].each do |path|
- assert_raise_with_message(LoadError, /#{path}\z/, bug3758) {require path}
+ e = assert_raise(LoadError, bug3758) {require path}
+ assert_operator(e.message, :end_with?, path, bug3758)
end
end