@Override public void visit(ThreadContext context, RubyHash self, IRubyObject key, IRubyObject value, int index, MarshalStream output) { try { output.dumpObject(key); output.dumpObject(value); } catch (IOException e) { throw new VisitorIOException(e); } } };
public void visit(IRubyObject key, IRubyObject value) { try { output.dumpObject(key); output.dumpObject(value); } catch (IOException e) { throw new VisitorIOException(e); } } }, hashSize);
public void visit(IRubyObject key, IRubyObject value) { try { output.dumpObject(key); output.dumpObject(value); } catch (IOException e) { throw new VisitorIOException(e); } } }, hashSize);
@Override public void visit(ThreadContext context, RubyHash self, IRubyObject key, IRubyObject value, int index, MarshalStream output) { try { output.dumpObject(key); output.dumpObject(value); } catch (IOException e) { throw new VisitorIOException(e); } } };
private static boolean dumpToStream(Ruby runtime, IRubyObject object, OutputStream rawOutput, int depthLimit) throws IOException { MarshalStream output = new MarshalStream(runtime, rawOutput, depthLimit); output.dumpObject(object); return output.isTainted(); }
private static boolean dumpToStream(Ruby runtime, IRubyObject object, OutputStream rawOutput, int depthLimit) throws IOException { MarshalStream output = new MarshalStream(runtime, rawOutput, depthLimit); output.dumpObject(object); return output.isTainted(); }
private static boolean[] dumpToStream(Ruby runtime, IRubyObject object, OutputStream rawOutput, int depthLimit) throws IOException { MarshalStream output = new MarshalStream(runtime, rawOutput, depthLimit); output.dumpObject(object); return new boolean[] {output.isTainted(), output.isUntrusted()}; } }
private static boolean[] dumpToStream(Ruby runtime, IRubyObject object, OutputStream rawOutput, int depthLimit) throws IOException { MarshalStream output = new MarshalStream(runtime, rawOutput, depthLimit); output.dumpObject(object); return new boolean[] {output.isTainted(), output.isUntrusted()}; } }
private void dumpVariablesShared(List<Variable<Object>> vars) throws IOException { for (Variable<Object> var : vars) { if (var.getValue() instanceof IRubyObject) { writeAndRegisterSymbol(var.getName()); dumpObject((IRubyObject)var.getValue()); } } }
private void dumpVariablesShared(List<Variable<Object>> vars) throws IOException { for (Variable<Object> var : vars) { if (var.getValue() instanceof IRubyObject) { writeAndRegisterSymbol(var.getName()); dumpObject((IRubyObject)var.getValue()); } } }
public static void marshalTo(RubyStruct struct, MarshalStream output) throws java.io.IOException { output.registerLinkTarget(struct); output.dumpDefaultObjectHeader('S', struct.getMetaClass()); RubyArray member = __member__(struct.classOf()); output.writeInt(member.size()); for (int i = 0; i < member.size(); i++) { RubySymbol name = (RubySymbol) member.eltInternal(i); output.dumpObject(name); output.dumpObject(struct.values[i]); } }
public static void marshalTo(RubyStruct struct, MarshalStream output) throws java.io.IOException { output.registerLinkTarget(struct); output.dumpDefaultObjectHeader('S', struct.getMetaClass()); RubyArray member = __member__(struct.classOf()); output.writeInt(member.size()); for (int i = 0; i < member.size(); i++) { RubySymbol name = (RubySymbol) member.eltInternal(i); output.dumpObject(name); output.dumpObject(struct.values[i]); } }
public static void marshalTo(RubyStruct struct, MarshalStream output) throws java.io.IOException { output.registerLinkTarget(struct); output.dumpDefaultObjectHeader('S', struct.getMetaClass()); RubyArray member = __member__(struct.classOf()); output.writeInt(member.size()); for (int i = 0; i < member.size(); i++) { RubySymbol name = (RubySymbol) member.eltInternal(i); output.dumpObject(name); output.dumpObject(struct.values[i]); } }
public static void marshalTo(RubyStruct struct, MarshalStream output) throws java.io.IOException { output.registerLinkTarget(struct); output.dumpDefaultObjectHeader('S', struct.getMetaClass()); RubyArray member = __member__(struct.classOf()); output.writeInt(member.size()); for (int i = 0; i < member.size(); i++) { RubySymbol name = (RubySymbol) member.eltInternal(i); output.dumpObject(name); output.dumpObject(struct.values[i]); } }
public static void marshalTo(RubyArray array, MarshalStream output) throws IOException { output.registerLinkTarget(array); int length = array.realLength; output.writeInt(length); try { for (int i = 0; i < length; i++) { output.dumpObject(array.eltInternal(i)); } } catch (ArrayIndexOutOfBoundsException ex) { throw concurrentModification(array.getRuntime(), ex); } }
public static void marshalTo(RubyArray array, MarshalStream output) throws IOException { output.registerLinkTarget(array); int length = array.realLength; output.writeInt(length); try { for (int i = 0; i < length; i++) { output.dumpObject(array.eltInternal(i)); } } catch (ArrayIndexOutOfBoundsException ex) { throw concurrentModification(array.getRuntime(), ex); } }
public static void marshalTo(final RubyHash hash, final MarshalStream output) throws IOException { output.registerLinkTarget(hash); int hashSize = hash.size; output.writeInt(hashSize); try { hash.visitLimited(hash.getRuntime().getCurrentContext(), MarshalDumpVisitor, hashSize, output); } catch (VisitorIOException e) { throw (IOException)e.getCause(); } if (hash.ifNone != UNDEF) output.dumpObject(hash.ifNone); }
private void dumpVariablesShared(List<Variable<Object>> vars) throws IOException { for (Variable<Object> var : vars) { if (var.getValue() instanceof IRubyObject) { writeAndRegisterSymbol(RubySymbol.newSymbol(runtime, var.getName()).getBytes()); dumpObject((IRubyObject)var.getValue()); } } }
public static void marshalTo(final RubyHash hash, final MarshalStream output) throws IOException { output.registerLinkTarget(hash); int hashSize = hash.size; output.writeInt(hashSize); try { hash.visitLimited(hash.getRuntime().getCurrentContext(), MarshalDumpVisitor, hashSize, output); } catch (VisitorIOException e) { throw (IOException)e.getCause(); } if (hash.ifNone != UNDEF) output.dumpObject(hash.ifNone); }
private void dumpVariablesShared(List<Variable<Object>> vars) throws IOException { for (Variable<Object> var : vars) { if (var.getValue() instanceof IRubyObject) { writeAndRegisterSymbol(RubySymbol.newSymbol(runtime, var.getName()).getBytes()); dumpObject((IRubyObject)var.getValue()); } } }