diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-05 07:58:14 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-05 07:58:14 +0000 |
commit | 2967707b32fc4cd59c4685f276aaf62d6a80a6cf (patch) | |
tree | 188acbd1d15c5217fa8dc68796205fd615deb32c /test/ruby/test_rubyoptions.rb | |
parent | 1b644ad43dc7cbcfabfc6ec515024c2de5cf6935 (diff) |
* test/ruby/test_rubyoptions.rb: better approach.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 760c8316d7..5e1d2f0cfa 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -409,12 +409,13 @@ class TestRubyOptions < Test::Unit::TestCase def test_notfound notexist = "./notexist.rb" - rubybin = Regexp.quote(EnvUtil.rubybin) + rubybin = EnvUtil.rubybin.dup + rubybin.gsub!(%r(/), '\\') if /mswin|mingw/ =~ RUBY_PLATFORM + rubybin = Regexp.quote(rubybin) pat = Regexp.quote(notexist) bug1573 = '[ruby-core:23717]' assert_file.not_exist?(notexist) assert_in_out_err(["-r", notexist, "-ep"], "", [], /.* -- #{pat} \(LoadError\)/, bug1573) - rubybin.gsub!(%r(/), '\\\\') if /mswin|mingw/ =~ RUBY_PLATFORM assert_in_out_err([notexist], "", [], /#{rubybin}:.* -- #{pat} \(LoadError\)/, bug1573) end |