From a39ad0f0652608ec40aa27280b9400e9858b794a Mon Sep 17 00:00:00 2001 From: kazu Date: Thu, 13 Jul 2017 23:55:41 +0000 Subject: [PATCH] Use tr! instead of gsub! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rubyoptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 93eecd28c4..c7d1bcdea4 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -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]'