diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_require.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 96b1551da2..9efd828bf2 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -339,4 +339,21 @@ class TestRequire < Test::Unit::TestCase [], /\$LOADED_FEATURES is frozen; cannot append feature \(RuntimeError\)$/, bug3756) end + + def test_loaded_features_encoding + bug6377 = '[ruby-core:44750]' + loadpath = $:.dup + features = $".dup + $".clear + $:.clear + Dir.mktmpdir {|tmp| + $: << tmp + open(File.join(tmp, "foo.rb"), "w") {} + require "foo" + assert_equal(tmp.encoding, $"[0].encoding, bug6377) + } + ensure + $:.replace(loadpath) + $".replace(features) + end end |