diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-01 19:54:46 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-01 20:57:30 +0900 |
commit | 462a8be5112f8c4e621d106304ac617ebcf39eb0 (patch) | |
tree | e00230d6b6109a3c5ae8211faa026ef1e39ac4e5 /tool/lib/vcs.rb | |
parent | f67ab7f30c837ce4b9c2ae39d7c189413fac6dff (diff) | |
download | ruby-462a8be5112f8c4e621d106304ac617ebcf39eb0.tar.gz |
VCS#revision_header: Make arguments optional
Diffstat (limited to 'tool/lib/vcs.rb')
-rw-r--r-- | tool/lib/vcs.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |