From fc4dd7d3e20b4eaf02d1dd59787abdc4c6c24e3a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 7 Jul 2019 19:05:33 +0900 Subject: [PATCH] Git branch name can contain `#{}` too --- tool/file2lastrev.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb index eb0cd56319..e39e7422d3 100755 --- a/tool/file2lastrev.rb +++ b/tool/file2lastrev.rb @@ -69,7 +69,8 @@ vcs = nil e = '..' limit = @limit name = branch.sub(/\A(.{#{limit-e.size}}).{#{e.size+1},}/o) {$1+e} - "#define RUBY_BRANCH_NAME #{name.dump}" + name = name.dump.sub(/\\#/, '#') + "#define RUBY_BRANCH_NAME #{name}" end, if title title = title.dump.sub(/\\#/, '#')