From 893b2d97a0c5bcdaa73aa7b8d3cc7344cab83cab Mon Sep 17 00:00:00 2001 From: k0kubun Date: Sun, 8 Jul 2018 15:05:18 +0000 Subject: [PATCH] benchmark/driver.rb: fix wrong multiline regexp git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- benchmark/driver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/driver.rb b/benchmark/driver.rb index 3536d9abd4..efb73b4eed 100755 --- a/benchmark/driver.rb +++ b/benchmark/driver.rb @@ -50,7 +50,7 @@ class BenchmarkDriver def build_yaml(file) magic_comment = '# prelude' # bm_so_nsieve_bits hangs without magic comment name = File.basename(file).sub(/\Abm_/, '').sub(/\.rb\z/, '') - script = File.read(file).sub(/^__END__\n(.+\n)*/m, '').sub(/\A(^#.+\n)+/m) do |comment| + script = File.read(file).sub(/^__END__\n(.+\n)*/m, '').sub(/\A(^#[^\n]+\n)+/m) do |comment| magic_comment = comment '' end