diff options
author | shirosaki <shirosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-06 02:30:52 +0000 |
---|---|---|
committer | shirosaki <shirosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-06 02:30:52 +0000 |
commit | e4283fd39d9e8c508ce5ee2dc069b6f5545cd3d8 (patch) | |
tree | 7851bf68eb0061cebcda1f983258e697ec3b29cf /test/ruby | |
parent | 8ee121d060ed7b3191e86c981fe144be2e19953a (diff) | |
download | ruby-e4283fd39d9e8c508ce5ee2dc069b6f5545cd3d8.tar.gz |
* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
fix load path for encoding to run the test as stand-alone.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 |