예제 #1
0
 public IRubyObject reCache(ThreadContext context, String name, int index) {
   int newGeneration = context.getRuntime().getConstantGeneration();
   IRubyObject value = context.getConstant(name);
   constants[index] = value;
   if (value != null) {
     constantGenerations[index] = newGeneration;
   }
   return value;
 }
예제 #2
0
파일: ConstNode.java 프로젝트: GUI/jruby
  public IRubyObject reCache(ThreadContext context, String name) {
    Object newGeneration = context.runtime.getConstantInvalidator().getData();
    IRubyObject value = context.getConstant(name);

    cachedValue = value;

    if (value != null) generation = newGeneration;

    return value;
  }