Package org.jruby

Examples of org.jruby.RubyHash.containsKey()


      // remove unused
      for (int i = 1, l = aro.size(); i < l; i++) {
        int nid = (Integer) aro.get(i).getObject().getInstanceVariable("@id").toJava(Integer.class);
        RubyFixnum rid = (RubyFixnum) aro.get(i).getObject().getInstanceVariable("@id");
        if (mapinfos.containsKey(rid) && !idCache.containsKey(nid)) {
          mapinfos.remove(mapinfos.get(rid));
        }
      }

      // save it
View Full Code Here


      }
     
      RubyHash hash = (RubyHash) callsites.get(currentMethod);
      RubyArray callerArray = customBacktrace(context);
     
      if (!hash.containsKey(callerArray)) {
        hash.put(callerArray, Long.valueOf(0));
      }
     
      Long count = (Long) hash.get(callerArray);
      long itCount = count.longValue() + 1L;
View Full Code Here

    //Line numbers are 1s based.  Arrays are zero based.  We need to compensate for that.
    line -= 1;
   
    // Make sure that we have SCRIPT_LINES__ and it's a hash
    RubyHash scriptLines = getScriptLines(context.getRuntime());
    if (scriptLines == null || !scriptLines.containsKey(file)) {
      return;
    }
   
    // make sure the file's source lines are in SCRIPT_LINES__
    cover = getCover(context.getRuntime());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.