[前][次][番号順一覧][スレッド一覧]

ruby-changes:64969

From: Nobuyoshi <ko1@a...>
Date: Thu, 21 Jan 2021 01:03:54 +0900 (JST)
Subject: [ruby-changes:64969] 3b631d0f73 (master): Support `i` command in log-fix

https://git.ruby-lang.org/ruby.git/commit/?id=3b631d0f73

From 3b631d0f73117af8b69b91b2ded557d07872c464 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 21 Jan 2021 00:55:47 +0900
Subject: Support `i` command in log-fix


diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index dd662e0..837e5c2 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -579,7 +579,8 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L579
               fix = $1
               s = s.lines
               fix.each_line do |x|
-                if %r[^ +(\d+)s/(.+)/(.*)/] =~ x
+                case x
+                when %r[^ +(\d+)s/(.+)/(.*)/]
                   begin
                     s[$1.to_i][$2] = $3
                   rescue IndexError
@@ -593,6 +594,8 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L594
                     end
                     raise message.join('')
                   end
+                when %r[^( +)(\d+)i/(.+)/]
+                  s[$2.to_i, 0] = "#{$1}#{$3}\n"
                 end
               end
               s = s.join('')
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]