diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_require.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 2e7b37d138..049f7b1470 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -73,7 +73,9 @@ class TestRequire < Test::Unit::TestCase open(require_path, "wb") {} assert_in_out_err([], <<-INPUT, %w(:ok), [], bug8165) # coding: #{encoding} - $:.replace([IO::NULL] + $:.reject {|path| path !~ /\.ext/}) + # leave paths for require encoding objects + enc_path = Regexp.new(RUBY_PLATFORM) + $:.replace([IO::NULL] + $:.reject {|path| enc_path !~ path}) p :ok if require '#{require_path}' p :ng if require '#{require_path}' INPUT |