Skip to content

Commit

Permalink
Fix Style/MethodCallParentheses failed on or assign to instance var…
Browse files Browse the repository at this point in the history
…iables accessor
  • Loading branch information
yuroyoro committed Nov 4, 2015
1 parent eeed5ff commit ec8f492
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rubocop/cop/style/method_call_parentheses.rb
Expand Up @@ -38,7 +38,8 @@ def same_name_assignment?(node)
asgn_node = mlhs_node.children[node.sibling_index]
end

asgn_node.loc.name.source == method_name.to_s
asgn_node.loc.respond_to?(:name) &&
(asgn_node.loc.name.source == method_name.to_s)
end
end
end
Expand Down

0 comments on commit ec8f492

Please sign in to comment.