Use `String#end_with?` instead of `String#ends_with?`
The former is in Ruby's core lib, so is more flexible.
This commit is contained in:
parent
2286681e1c
commit
359b65beac
|
@ -75,7 +75,7 @@ module Gitlab
|
|||
resolved_lines = file.resolve_lines(params[:sections])
|
||||
new_file = resolved_lines.map { |line| line[:full_line] }.join("\n")
|
||||
|
||||
new_file << "\n" if file.our_blob.data.ends_with?("\n")
|
||||
new_file << "\n" if file.our_blob.data.end_with?("\n")
|
||||
elsif params[:content]
|
||||
new_file = file.resolve_content(params[:content])
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue