Skip to content

Commit 206dfd7

Browse files
zundaykzts
authored andcommitted
Clarify keyword arguments with ** (#12769)
This change is to suppress the warning below on on ruby-2.7.0: - warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
1 parent 7583679 commit 206dfd7

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/helpers/accounts_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module AccountsHelper
44
def display_name(account, **options)
55
if options[:custom_emojify]
6-
Formatter.instance.format_display_name(account, options)
6+
Formatter.instance.format_display_name(account, **options)
77
else
88
account.display_name.presence || account.username
99
end

app/lib/activitypub/activity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def perform
2121
class << self
2222
def factory(json, account, **options)
2323
@json = json
24-
klass&.new(json, account, options)
24+
klass&.new(json, account, **options)
2525
end
2626

2727
private

app/services/activitypub/process_collection_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def supported_context?
3737
end
3838

3939
def process_item(item)
40-
activity = ActivityPub::Activity.factory(item, @account, @options)
40+
activity = ActivityPub::Activity.factory(item, @account, **@options)
4141
activity&.perform
4242
end
4343

0 commit comments

Comments
 (0)