diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-12-22 00:33:44 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-12-22 00:34:21 +0900 |
commit | 398aaed2f0e56a81c5c15cc1126b6bbba79ffec0 (patch) | |
tree | f25b9bbf1447bce53781689a544727bc9c6268ab /tool/sync_default_gems.rb | |
parent | 98fbebf110f0802fd6c72e48eb9d9a6c40878e40 (diff) | |
download | ruby-398aaed2f0e56a81c5c15cc1126b6bbba79ffec0.tar.gz |
Fix the case trailer without newline
cf0b413ef8b794ef6e7436f22fd5a998050dada9
Diffstat (limited to 'tool/sync_default_gems.rb')
-rwxr-xr-x | tool/sync_default_gems.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 40da50a86b..15f651ca06 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -466,13 +466,13 @@ module SyncDefaultGems if log and !log.empty? log.sub!(/(?<=\n)\n+\z/, '') # drop empty lines at the last conv[log] - log.sub!(/(?:(\A\s*)|\s*\n)(?=((?i:Co-authored-by:.*\n)+)?\Z)/) { + log.sub!(/(?:(\A\s*)|\s*\n)(?=((?i:^Co-authored-by:.*\n?)+)?\Z)/) { ($~.begin(1) ? "" : "\n\n") + commit_url + ($~.begin(2) ? "\n" : "") } else log = commit_url end - print subject, "\n\n", log + puts subject, "\n", log end # NOTE: This method is also used by GitHub ruby/git.ruby-lang.org's bin/update-default-gem.sh |