Skip to content

Commit d5ad647

Browse files
committed
Fix a build error
This PR fixes the following build error: ```console $ bundle exec rake (snip) Offenses: lib/rubocop/cop/rails/reversible_migration.rb:310:46: C: [Correctable] InternalAffairs/RedundantMethodDispatchNode: Remove the redundant send_node. (ancestor.block_type? && ancestor.send_node.method?(:reversible)) || ancestor.send_node.method?(:up_only) ^^^^^^^^^^ lib/rubocop/cop/rails/reversible_migration.rb:310:90: C: [Correctable] InternalAffairs/RedundantMethodDispatchNode: Remove the redundant send_node. (ancestor.block_type? && ancestor.send_node.method?(:reversible)) || ancestor.send_node.method?(:up_only) ^^^^^^^^^^ 285 files inspected, 2 offenses detected, 2 offenses autocorrectable ```
1 parent 58c62cb commit d5ad647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rubocop/cop/rails/reversible_migration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def within_change_method?(node)
307307

308308
def within_reversible_or_up_only_block?(node)
309309
node.each_ancestor(:block).any? do |ancestor|
310-
(ancestor.block_type? && ancestor.send_node.method?(:reversible)) || ancestor.send_node.method?(:up_only)
310+
(ancestor.block_type? && ancestor.method?(:reversible)) || ancestor.method?(:up_only)
311311
end
312312
end
313313

0 commit comments

Comments
 (0)