1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use tr! instead of gsub!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2017-07-13 23:55:41 +00:00
parent 24e4a877ce
commit a39ad0f065

View file

@ -453,7 +453,7 @@ class TestRubyOptions < Test::Unit::TestCase
notexist = "./notexist.rb"
dir, *rubybin = RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME', 'EXEEXT')
rubybin = "#{dir}/#{rubybin.join('')}"
rubybin.gsub!(%r(/), '\\') if /mswin|mingw/ =~ RUBY_PLATFORM
rubybin.tr!('/', '\\') if /mswin|mingw/ =~ RUBY_PLATFORM
rubybin = Regexp.quote(rubybin)
pat = Regexp.quote(notexist)
bug1573 = '[ruby-core:23717]'