Browse Source

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/
closed-social-v3
Daigo 3 Dango 4 years ago
committed by Yamagishi Kazutoshi
parent
commit
206dfd7dad
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/helpers/accounts_helper.rb
  2. +1
    -1
      app/lib/activitypub/activity.rb
  3. +1
    -1
      app/services/activitypub/process_collection_service.rb

+ 1
- 1
app/helpers/accounts_helper.rb View File

@ -3,7 +3,7 @@
module AccountsHelper
def display_name(account, **options)
if options[:custom_emojify]
Formatter.instance.format_display_name(account, options)
Formatter.instance.format_display_name(account, **options)
else
account.display_name.presence || account.username
end

+ 1
- 1
app/lib/activitypub/activity.rb View File

@ -21,7 +21,7 @@ class ActivityPub::Activity
class << self
def factory(json, account, **options)
@json = json
klass&.new(json, account, options)
klass&.new(json, account, **options)
end
private

+ 1
- 1
app/services/activitypub/process_collection_service.rb View File

@ -37,7 +37,7 @@ class ActivityPub::ProcessCollectionService < BaseService
end
def process_item(item)
activity = ActivityPub::Activity.factory(item, @account, @options)
activity = ActivityPub::Activity.factory(item, @account, **@options)
activity&.perform
end

Loading…
Cancel
Save