Skip to content

Commit

Permalink
Better method detection
Browse files Browse the repository at this point in the history
  • Loading branch information
magec committed Sep 22, 2016
1 parent 080c36b commit a8616ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/migrations/remove_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def on_send(node)
remove_index_found(node) do
node.each_ancestor do |a|
next unless a.def_type?
if a.source =~ /def up/ || a.source =~ /def change/
if a.to_s =~ /def :up/ || a.to_s =~ /def :change/
add_offense(node, :selector, MSG)
end
end
Expand Down

0 comments on commit a8616ad

Please sign in to comment.