Exemplo n.º 1
0
    public void put(
        ThreadContext context, Storage cache, Member m, IRubyObject ptr, IRubyObject value) {
      final IRubyObject nativeValue = mappedType.toNative(context, value);
      nativeFieldIO.put(context, cache, m, ptr, nativeValue);

      if (isValueReferenceNeeded()) {
        // keep references to both the ruby and native values to preserve
        // reference chains
        cache.putReference(m, new Object[] {value, nativeValue});
      }
    }
Exemplo n.º 2
0
 public IRubyObject toNative(ThreadContext context, IRubyObject obj) {
   return converter.toNative(context, obj);
 }