mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix ArgumentError in expand_tabs.rb
This fixes the following in my environment: misc/expand_tabs.rb:29:in `=~': invalid byte sequence in US-ASCII (ArgumentError) This switches from =~ to start_with? as a regular expression is not actually needed here.
This commit is contained in:
parent
e496e96547
commit
b4dfac2c12
1 changed files with 2 additions and 2 deletions
|
@ -24,9 +24,9 @@ class Git
|
|||
# [0, 1, 4, ...]
|
||||
def updated_lines(file)
|
||||
lines = []
|
||||
revs_pattern = /\A0{40} /
|
||||
revs_pattern = ("0"*40) + " "
|
||||
with_clean_env { IO.popen(['git', 'blame', '-l', '--', file], &:readlines) }.each_with_index do |line, index|
|
||||
if revs_pattern =~ line
|
||||
if line.b.start_with?(revs_pattern)
|
||||
lines << index
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue