Commit 8e1f85eb authored by Patrick Bajao's avatar Patrick Bajao

Fix Ruby 2.7 warnings for MergeRequestContextCommit

In Ruby 3.0, positional arguments and keyword arguments will be
separated. In Ruby 2.7, deprecation warnings related to keyword
arguments show up.

Modify MergeRequestContextCommit.bulk_insert signature to specify
arguments clearly. Use a double splat to specify that **args are
keyword arguments.
parent 387ae1dc
......@@ -22,8 +22,8 @@ class MergeRequestContextCommit < ApplicationRecord
end
# create MergeRequestContextCommit by given commit sha and it's diff file record
def self.bulk_insert(*args)
Gitlab::Database.bulk_insert('merge_request_context_commits', *args) # rubocop:disable Gitlab/BulkInsert
def self.bulk_insert(rows, **args)
Gitlab::Database.bulk_insert('merge_request_context_commits', rows, **args) # rubocop:disable Gitlab/BulkInsert
end
def to_commit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment