summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-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