Skip to content

Commit

Permalink
Remove Ruby 2.7 guards
Browse files Browse the repository at this point in the history
  • Loading branch information
Irving-Betterment committed Dec 28, 2023
1 parent cd5933c commit 5e04c9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
20 changes: 9 additions & 11 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 99999`
# on 2023-01-20 19:16:15 UTC using RuboCop version 1.43.0.
# on 2023-12-28 21:21:19 UTC using RuboCop version 1.59.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -33,6 +33,7 @@ Lint/ConstantDefinitionInBlock:
- 'spec/message_sending_spec.rb'

# Offense count: 2
# Configuration parameters: AllowedParentClasses.
Lint/MissingSuper:
Exclude:
- 'lib/delayed/message_sending.rb'
Expand All @@ -50,25 +51,23 @@ Lint/SuppressedException:
- 'lib/delayed/backend/base.rb'

# Offense count: 4
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes, Max.
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
Metrics/AbcSize:
Exclude:
- 'lib/delayed/message_sending.rb'
- 'lib/delayed/psych_ext.rb'
- 'lib/delayed/worker.rb'

# Offense count: 1
RSpec/AnyInstance:
# This cop supports safe autocorrection (--autocorrect).
Performance/StringIdentifierArgument:
Exclude:
- 'spec/delayed/job_spec.rb'
- 'lib/delayed/monitor.rb'

# Offense count: 18
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
# Offense count: 1
RSpec/AnyInstance:
Exclude:
- 'spec/delayed/job_spec.rb'
- 'spec/delayed/priority_spec.rb'
- 'spec/message_sending_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Expand Down Expand Up @@ -165,11 +164,10 @@ Rake/DuplicateTask:
Exclude:
- 'Rakefile'

# Offense count: 4
# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Security/YAMLLoad:
Exclude:
- 'spec/delayed/serialization/active_record_spec.rb'
- 'spec/helper.rb'
- 'spec/yaml_ext_spec.rb'

Expand Down
8 changes: 1 addition & 7 deletions lib/delayed/performable_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ def display_name
end

def perform
return unless object

if kwargs.nil? || (RUBY_VERSION < '2.7' && kwargs.empty?)
object.send(method_name, *args)
else
object.send(method_name, *args, **kwargs)
end
object.send(method_name, *args, **kwargs) if object
end

def method(sym)
Expand Down

0 comments on commit 5e04c9c

Please sign in to comment.