diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-07 05:11:24 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-07 05:11:24 +0000 |
commit | 875bba3fc5fb5ee6f1b56bc8c36fa2afa76dc055 (patch) | |
tree | a7c2367400aac27f3da0ff522618f0e488d6cc45 /test/ruby | |
parent | 1f32d09523be89556b5e0d06f431b852b992a177 (diff) | |
download | ruby-875bba3fc5fb5ee6f1b56bc8c36fa2afa76dc055.tar.gz |
Regexp.escape(RUBY_PLATFORM)
* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
RUBY_PLATFORM should escape as Regexp,
because RUBY_PLATFORM may contain '.'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_require.rb | 2 |
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}' |