From 462a8be5112f8c4e621d106304ac617ebcf39eb0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 1 Sep 2022 19:54:46 +0900 Subject: VCS#revision_header: Make arguments optional --- tool/lib/vcs.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tool/lib') diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index db3a6f436f..65ab3d4eec 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -204,7 +204,7 @@ class VCS revision_handler(rev).short_revision(rev) end - def revision_header(last, changed, modified, branch, title, limit: 20, time: true) + def revision_header(last, modified = nil, branch = nil, title = nil, limit: 20) short = short_revision(last) if /[^\x00-\x7f]/ =~ title and title.respond_to?(:force_encoding) title = title.dup.force_encoding("US-ASCII") @@ -225,7 +225,7 @@ class VCS title = title.dump.sub(/\\#/, '#') code << "#define RUBY_LAST_COMMIT_TITLE #{title}" end - if modified and time + if modified t = modified.utc code << t.strftime('#define RUBY_RELEASE_DATETIME "%FT%TZ"') end -- cgit v1.2.3