1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Support i command in log-fix

This commit is contained in:
Nobuyoshi Nakada 2021-01-21 00:55:47 +09:00
parent 565aeb81e0
commit 3b631d0f73
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -579,7 +579,8 @@ class VCS
fix = $1 fix = $1
s = s.lines s = s.lines
fix.each_line do |x| fix.each_line do |x|
if %r[^ +(\d+)s/(.+)/(.*)/] =~ x case x
when %r[^ +(\d+)s/(.+)/(.*)/]
begin begin
s[$1.to_i][$2] = $3 s[$1.to_i][$2] = $3
rescue IndexError rescue IndexError
@ -593,6 +594,8 @@ class VCS
end end
raise message.join('') raise message.join('')
end end
when %r[^( +)(\d+)i/(.+)/]
s[$2.to_i, 0] = "#{$1}#{$3}\n"
end end
end end
s = s.join('') s = s.join('')