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:
Alejandro Rodríguez 2017-12-01 18:15:52 -03:00
parent 2286681e1c
commit 359b65beac
1 changed files with 1 additions and 1 deletions

View File

@ -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