summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_require.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 049f7b1470..c03876d223 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -74,7 +74,7 @@ class TestRequire < Test::Unit::TestCase
assert_in_out_err([], <<-INPUT, %w(:ok), [], bug8165)
# coding: #{encoding}
# leave paths for require encoding objects
- enc_path = Regexp.new(RUBY_PLATFORM)
+ enc_path = Regexp.new(Regexp.escape(RUBY_PLATFORM))
$:.replace([IO::NULL] + $:.reject {|path| enc_path !~ path})
p :ok if require '#{require_path}'
p :ng if require '#{require_path}'