diff --git a/lib/rubocop/cop/style/parallel_assignment.rb b/lib/rubocop/cop/style/parallel_assignment.rb index 86d72197170..bb6d1b31f34 100644 --- a/lib/rubocop/cop/style/parallel_assignment.rb +++ b/lib/rubocop/cop/style/parallel_assignment.rb @@ -164,7 +164,12 @@ def dependency?(lhs, rhs) # Does `rhs` access the same value which is assigned by `lhs`? def accesses?(rhs, lhs) if lhs.method?(:[]=) - matching_calls(rhs, lhs.receiver, :[]).any?(lhs.arguments) + # FIXME: Workaround `rubocop:disable` comment for JRuby. + # rubocop:disable Performance/RedundantEqualityComparisonBlock + matching_calls(rhs, lhs.receiver, :[]).any? do |args| + args == lhs.arguments + end + # rubocop:enable Performance/RedundantEqualityComparisonBlock else access_method = lhs.method_name.to_s.chop.to_sym matching_calls(rhs, lhs.receiver, access_method).any?