diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_require.rb | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sat Apr 6 11:23:18 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com> + + * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path): + fix load path for encoding to run the test as stand-alone. + Sat Apr 6 09:54:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * pack.c (NATINT_LEN): fix definition order, must be after 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 |