diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-10-11 09:56:42 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-10-11 11:01:56 +0900 |
| commit | e500265b099df21768c28890c77fade4b60da068 (patch) | |
| tree | 8f53c8be7a42bda4a15939312467d55901e0360d /tool/commit-email.rb | |
| parent | fa883a4de89c40d152c28ee0de83ff05b40059df (diff) | |
commit-email.rb: Suppress warnings
* assigned but unused variable
* literal string will be frozen in the future
Diffstat (limited to 'tool/commit-email.rb')
| -rwxr-xr-x | tool/commit-email.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tool/commit-email.rb b/tool/commit-email.rb index 2381a74deb..c887f8783e 100755 --- a/tool/commit-email.rb +++ b/tool/commit-email.rb @@ -211,7 +211,7 @@ class << CommitEmail end def make_body(info, viewer_uri:) - body = '' + body = +'' body << "#{info.author}\t#{format_time(info.date)}\n" body << "\n" body << " New Revision: #{info.revision}\n" @@ -276,7 +276,6 @@ class << CommitEmail end def changed_dirs_info(info, uri) - rev = info.revision (info.added_dirs.collect do |dir| " Added: #{dir}\n" end + info.deleted_dirs.collect do |dir| @@ -293,14 +292,11 @@ class << CommitEmail values.collect do |type, value| case type when :added - command = 'cat' rev = "?revision=#{info.revision}&view=markup" when :modified, :property_changed - command = 'diff' prev_revision = (info.revision.is_a?(Integer) ? info.revision - 1 : "#{info.revision}^") rev = "?r1=#{info.revision}&r2=#{prev_revision}&diff_format=u" when :deleted, :copied - command = 'cat' rev = '' else raise "unknown diff type: #{value[:type]}" @@ -328,7 +324,7 @@ class << CommitEmail end def make_subject(info) - subject = '' + subject = +'' subject << "#{info.revision}" subject << " (#{info.branch})" subject << ': ' |
