aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-29 17:43:14 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-29 17:43:14 +0900
commit01c765677566f227854d737efcf2c06d139ddbac (patch)
tree2464a43006cc91f4dca0da4771a9e485f0423b7e
parent5537a410594dfe54eeb86ec63e8860b63160f8ef (diff)
downloadruby-01c765677566f227854d737efcf2c06d139ddbac.tar.gz
Fix to replace only `-e` that is a path name in `assert_crash_report`
-rw-r--r--test/ruby/test_rubyoptions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index b2e2e7bb6c..191c0c2278 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -861,7 +861,7 @@ class TestRubyOptions < Test::Unit::TestCase
FileUtils.mkpath(File.join(dir, File.dirname(cmd)))
File.write(File.join(dir, cmd), SEGVTest::KILL_SELF+"\n")
c = Regexp.quote(cmd)
- list = list.map {|re| Regexp.new(re.source.gsub(/-e/) {c}, re.options)}
+ list = list.map {|re| Regexp.new(re.source.gsub(/^\s*(\(\?:)?\K-e(?=:)/) {c}, re.options)}
else
cmd = ['-e', SEGVTest::KILL_SELF]
end