зеркало из https://github.com/github/ruby.git
Removed unnecessary `chomp`
As `String#split` with the default argument drops trailing newline as a separator, preceding `String#chomp` is futile.
This commit is contained in:
Родитель
65aa68b009
Коммит
108f7536b3
|
@ -1042,7 +1042,7 @@ module Net
|
|||
return {} unless @string[3, 1] == '-'
|
||||
h = {}
|
||||
@string.lines.drop(1).each do |line|
|
||||
k, *v = line[4..-1].chomp.split
|
||||
k, *v = line[4..-1].split
|
||||
h[k] = v
|
||||
end
|
||||
h
|
||||
|
|
|
@ -135,7 +135,7 @@ def rebase_commits(impl)
|
|||
else
|
||||
last_merge = `git log --grep='^#{impl.last_merge_message}' -n 1 --format='%H %ct'`
|
||||
end
|
||||
last_merge, commit_timestamp = last_merge.chomp.split(' ')
|
||||
last_merge, commit_timestamp = last_merge.split(' ')
|
||||
|
||||
raise "Could not find last merge" unless last_merge
|
||||
puts "Last merge is #{last_merge}"
|
||||
|
|
|
@ -2381,7 +2381,7 @@ EOS
|
|||
end
|
||||
w.close
|
||||
assert_equal "exec failed\n", r.gets
|
||||
vals = r.gets.chomp.split.map!(&:to_i)
|
||||
vals = r.gets.split.map!(&:to_i)
|
||||
assert_operator vals[0], :>, vals[1], vals.inspect
|
||||
_, status = Process.waitpid2(pid)
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче