From 01c765677566f227854d737efcf2c06d139ddbac Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 29 Sep 2023 17:43:14 +0900 Subject: [PATCH] Fix to replace only `-e` that is a path name in `assert_crash_report` --- 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 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