summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-03-24 10:45:52 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-03-24 10:45:52 +0900
commitc565dfb09ad7d55fa671f65cea7088a914bf1931 (patch)
tree0d82255d9d90c6573d352b7c7b268fb6953ba2dc /test/ruby/test_m17n.rb
parent13e9551b97d6bb9fcd09283692f6090f4c418059 (diff)
test/json/test_helper.rb: Do not add a relative path to $LOAD_PATH
... because it conflicts with test/ruby/test_m17n.rb. An exception `incompatible character encodings: UTF-8 and UTF-16BE` occurs when: * a non-existence relative path is added to $LOAD_PATH, * ASCII-incompatible encoding is set to default_external, and * some file is loaded. ``` $LOAD_PATH << "no_existing_dir" Encoding.default_external = Encoding::UTF_16BE load "dummy.rb" #=> incompatible character encodings: UTF-8 and UTF-16BE ``` This issue can be actually observed by a combination of out-of-place build and the following command: make test-all TESTS="json ruby/m17n -n test_object_inspect_external" http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411 ASCII-incompatible default external encoding assumes that the cwd is the encoding, and it is attempted to beconcatenated with a non-existence relative LOAD_PATH UTF-8 string, which causes the exception. This changeset avoids a relative path.
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index fee38357d7..2c6dc3f8f5 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -311,16 +311,6 @@ class TestM17N < Test::Unit::TestCase
"abc".encode(Encoding.default_external)
end
- # debugging code for http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411
- begin
- "abc".encode(Encoding.default_external)
- rescue Encoding::CompatibilityError
- TracePoint.new(:raise) do |tp|
- Process.kill(:SEGV, $$)
- end.enable { "abc".encode(Encoding.default_external) }
- end
- # debugging code end
-
assert_equal '[abc]', [o].inspect
Encoding.default_external = Encoding::US_ASCII