private void findMaskingLocals() {
   for (Collection<LocalAsgnNode> localAsgnNodes : locals.values()) {
     for (LocalAsgnNode local : localAsgnNodes) {
       if (methods.contains(local.getName())) {
         createProblem(local.getPosition(), "Local variable hides method");
       }
     }
   }
 }
Esempio n. 2
0
 @Override
 public RubyNode visitLocalAsgnNode(org.jruby.ast.LocalAsgnNode node) {
   return translateLocalAssignment(node.getPosition(), node.getName(), node.getValueNode());
 }