summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_encoding.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb
index 40fd302c07..019cb2417f 100644
--- a/test/ruby/test_encoding.rb
+++ b/test/ruby/test_encoding.rb
@@ -123,4 +123,15 @@ class TestEncoding < Test::Unit::TestCase
assert_include(e.message, "/regexp/sQ\n")
end;
end
+
+ def test_nonascii_library_path
+ assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}".force_encoding("US-ASCII"))
+ begin;
+ assert_equal(Encoding::US_ASCII, __ENCODING__)
+ $:.unshift("/\x80")
+ assert_raise_with_message(LoadError, /\[Bug #16382\]/) do
+ $:.resolve_feature_path "[Bug #16382]"
+ end
+ end;
+ end
end