Skip to content

Commit 5330eb2

Browse files
committed
auto-fix Style/ArrayIntersect
1 parent e013945 commit 5330eb2

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: .rubocop_todo.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-04-04 23:03:43 UTC using RuboCop version 1.75.1.
3+
# on 2025-04-04 23:05:51 UTC using RuboCop version 1.75.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -24,9 +24,3 @@ RSpec/ReceiveMessages:
2424
Rails/ActiveSupportOnLoad:
2525
Exclude:
2626
- 'lib/paper_trail/frameworks/active_record.rb'
27-
28-
# Offense count: 1
29-
# This cop supports unsafe autocorrection (--autocorrect-all).
30-
Style/ArrayIntersect:
31-
Exclude:
32-
- 'lib/paper_trail/events/base.rb'

Diff for: lib/paper_trail/events/base.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def evaluate_only
157157
# @api private
158158
def ignored_attr_has_changed?
159159
ignored = calculated_ignored_array + @record.paper_trail_options[:skip]
160-
ignored.any? && (changed_in_latest_version & ignored).any?
160+
ignored.any? && changed_in_latest_version.intersect?(ignored)
161161
end
162162

163163
# Rails 5.1 changed the API of `ActiveRecord::Dirty`. See

0 commit comments

Comments
 (0)