diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-12-01 18:15:52 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-12-04 16:11:54 -0300 |
commit | 359b65beac43e009b715c2db048e06b6f96b0ee8 (patch) | |
tree | ee17865bb51c1ace853b69ca7e4ed9f0be30b0a7 /lib/gitlab/git/conflict | |
parent | 2286681e1ca5cfbdbb6167cc4f31f0933ee584a5 (diff) | |
download | gitlab-ce-359b65beac43e009b715c2db048e06b6f96b0ee8.tar.gz |
Use `String#end_with?` instead of `String#ends_with?`gitaly-conflict-file
The former is in Ruby's core lib, so is more flexible.
Diffstat (limited to 'lib/gitlab/git/conflict')
-rw-r--r-- | lib/gitlab/git/conflict/resolver.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/conflict/resolver.rb b/lib/gitlab/git/conflict/resolver.rb index df509c5f4ce..de8cce41b6d 100644 --- a/lib/gitlab/git/conflict/resolver.rb +++ b/lib/gitlab/git/conflict/resolver.rb @@ -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 |