From dfca266de8c5167bd21d474257b9b9dd1e43f851 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 14 Sep 2024 10:34:46 +0200 Subject: [PATCH] Fix Lint/AmbiguousOperator offenses --- .rubocop_todo.yml | 6 ------ lib/doc_key.rb | 2 +- lib/heathen/processor.rb | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3d14cc2..03cfdb8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -37,12 +37,6 @@ Layout/MultilineMethodCallBraceLayout: Exclude: - 'lib/heathen/executioner.rb' -# This cop supports safe autocorrection (--autocorrect). -Lint/AmbiguousOperator: - Exclude: - - 'lib/doc_key.rb' - - 'lib/heathen/processor.rb' - # This cop supports safe autocorrection (--autocorrect). Lint/AmbiguousOperatorPrecedence: Exclude: diff --git a/lib/doc_key.rb b/lib/doc_key.rb index 3a8a676..01d1524 100644 --- a/lib/doc_key.rb +++ b/lib/doc_key.rb @@ -13,7 +13,7 @@ class DocKey # Constructs [DocKey] from the input string, which should be the output from [#to_s]. def self.parse(doc_key_str) - self.new *(doc_key_str.split '/') + self.new(*doc_key_str.split('/')) end # Constructor. The app and doc_id may only be comprised of alphanumeric letters and diff --git a/lib/heathen/processor.rb b/lib/heathen/processor.rb index 5d577f5..3cf2646 100644 --- a/lib/heathen/processor.rb +++ b/lib/heathen/processor.rb @@ -35,7 +35,7 @@ def expect_mime_type(pattern) # Performs a sub-task, defined by action. See [Task] for details. def perform_task(action) task_proc = Task.find(action, job.mime_type)[:proc] - self.instance_eval &task_proc + self.instance_eval(&task_proc) end # Called to clean up temporary files at end of processing