summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-26 10:30:02 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-26 10:30:29 +0900
commit1e2a8f7c945ddb93f083a320f6ad6536596a81ce (patch)
treed3de6226416919229b2330d8308fcf808aa325a3
parent33c5e9d1c873f7a1a9dd88ee04e82d60fbc9c641 (diff)
vcs.rb: fix for baseruby 2.2
-rw-r--r--tool/lib/vcs.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index 5a33d87411..c5e75b987e 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -599,7 +599,8 @@ class VCS
s[$2.to_i, 0] = "#{$1}#{$3}\n"
when %r[^ +(\d+)(?:,(\d+))?d]
n = $1.to_i
- s[n..($2&.to_i || n)] = []
+ e = $2
+ s[n..(e ? e.to_i : n)] = []
end
end
s = s.join('')