diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-07-07 19:05:33 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-07-07 19:05:33 +0900 |
commit | fc4dd7d3e20b4eaf02d1dd59787abdc4c6c24e3a (patch) | |
tree | c1dba48b1b69a4ba5c0adbe8ecddeb13a7d3bcea /tool/file2lastrev.rb | |
parent | 19a4c42d6124aa3bcdf2cd53d510b22acb2b5104 (diff) |
Git branch name can contain `#{}` too
Diffstat (limited to 'tool/file2lastrev.rb')
-rwxr-xr-x | tool/file2lastrev.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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(/\\#/, '#') |