From c51e4937e7c7abafec00c883f3d7e45e53e5175f Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 20 Dec 2023 07:15:11 +0000 Subject: [PATCH] Fix RuboCop offense Style/SuperWithArgsParentheses (#39887). git-svn-id: https://svn.redmine.org/redmine/trunk@22530 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 6 +++--- app/models/issue.rb | 2 +- app/models/issue_query.rb | 2 +- app/models/mailer.rb | 4 ++-- app/models/project_query.rb | 2 +- app/models/time_entry_query.rb | 2 +- app/models/user_query.rb | 2 +- app/models/wiki_page.rb | 2 +- config/initializers/10-patches.rb | 2 +- lib/redmine/export/csv.rb | 2 +- lib/redmine/menu_manager.rb | 2 +- lib/redmine/wiki_formatting/common_mark/markdown_filter.rb | 2 +- test/test_helper.rb | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ef94688d4..e1b22eb75 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1675,7 +1675,7 @@ module ApplicationHelper source end end - super *sources, options + super(*sources, options) end # Overrides Rails' image_tag with themes and plugins support. @@ -1689,7 +1689,7 @@ module ApplicationHelper elsif current_theme && current_theme.images.include?(source) source = current_theme.image_path(source) end - super source, options + super(source, options) end # Overrides Rails' javascript_include_tag with plugins support @@ -1708,7 +1708,7 @@ module ApplicationHelper end end end - super *sources, options + super(*sources, options) end def sidebar_content? diff --git a/app/models/issue.rb b/app/models/issue.rb index 8c8947bac..ac0786d33 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -475,7 +475,7 @@ class Issue < ActiveRecord::Base send "#{attr}=", attrs.delete(attr) end end - super attrs, *args + super(attrs, *args) end def attributes=(new_attributes) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 9e1e1c432..1e08794dd 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -97,7 +97,7 @@ class IssueQuery < Query end def initialize(attributes=nil, *args) - super attributes + super(attributes) self.filters ||= {'status_id' => {:operator => "o", :values => [""]}} end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 689e31901..c4c7ab07f 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -714,9 +714,9 @@ class Mailer < ActionMailer::Base end if block - super headers, &block + super(headers, &block) else - super headers do |format| + super(headers) do |format| format.text format.html unless Setting.plain_text_mail? end diff --git a/app/models/project_query.rb b/app/models/project_query.rb index 4224c0c37..714136f6f 100644 --- a/app/models/project_query.rb +++ b/app/models/project_query.rb @@ -52,7 +52,7 @@ class ProjectQuery < Query end def initialize(attributes=nil, *args) - super attributes + super(attributes) self.filters ||= {'status' => {:operator => "=", :values => ['1']}} end diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index b586350ca..28cf11438 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -40,7 +40,7 @@ class TimeEntryQuery < Query ] def initialize(attributes=nil, *args) - super attributes + super(attributes) self.filters ||= {'spent_on' => {:operator => "*", :values => []}} end diff --git a/app/models/user_query.rb b/app/models/user_query.rb index cd3a5172b..2ee71cc54 100644 --- a/app/models/user_query.rb +++ b/app/models/user_query.rb @@ -34,7 +34,7 @@ class UserQuery < Query ] def initialize(attributes=nil, *args) - super attributes + super(attributes) self.filters ||= { 'status' => {operator: "=", values: [User::STATUS_ACTIVE]} } end diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 0ee06673e..ea9d079e8 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -108,7 +108,7 @@ class WikiPage < ActiveRecord::Base end end - super attrs, user + super(attrs, user) end # Manages redirects if page is renamed or moved diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index 4869b3b83..9a3238963 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -145,7 +145,7 @@ module ActionView if (Array(values) & [:xml, :json]).any? values << :api end - super values + super(values) end end) end diff --git a/lib/redmine/export/csv.rb b/lib/redmine/export/csv.rb index c55546347..8606eb438 100644 --- a/lib/redmine/export/csv.rb +++ b/lib/redmine/export/csv.rb @@ -57,7 +57,7 @@ module Redmine field end end - super row + super(row) end end end diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 4f5556cf8..6f4e1b54f 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -453,7 +453,7 @@ module Redmine @parent = options[:parent] @child_menus = options[:children] @last = options[:last] || false - super @name.to_sym + super(@name.to_sym) end def caption(project=nil) diff --git a/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb b/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb index bef43413f..9c05389f1 100644 --- a/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb +++ b/lib/redmine/wiki_formatting/common_mark/markdown_filter.rb @@ -27,7 +27,7 @@ module Redmine # options class MarkdownFilter < HTML::Pipeline::TextFilter def initialize(text, context = nil, result = nil) - super text, context, result + super(text, context, result) @text = @text.delete "\r" end diff --git a/test/test_helper.rb b/test/test_helper.rb index 19fa1ca4f..45fedd8e7 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -489,7 +489,7 @@ module Redmine API_FORMATS.each do |format| format_request = request.sub /$/, ".#{format}" - super options.merge(format_request => arg[request], :format => format) + super(options.merge(format_request => arg[request], :format => format)) end end end -- 2.39.5