mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
no need to double strip this line
This commit is contained in:
parent
4c6eeaac15
commit
d7b0f0069c
|
@ -30,7 +30,7 @@ def swap_address(hosts, name, ips)
|
||||||
hosts.split("\n").each do |line|
|
hosts.split("\n").each do |line|
|
||||||
line.strip!
|
line.strip!
|
||||||
if line[0] != '#'
|
if line[0] != '#'
|
||||||
_, hostname = line.strip.split(/\s+/)
|
_, hostname = line.split(/\s+/)
|
||||||
next if hostname == name
|
next if hostname == name
|
||||||
end
|
end
|
||||||
new_file << line
|
new_file << line
|
||||||
|
|
Loading…
Reference in New Issue
Block a user