public Object unmarshalFrom(Ruby runtime, RubyClass type, UnmarshalStream unmarshalStream) throws IOException { Object result = defaultMarshal.unmarshalFrom(runtime, type, unmarshalStream); ((RubySet) result).unmarshal(); return result; }
public Object unmarshalFrom(Ruby runtime, RubyClass type, UnmarshalStream unmarshalStream) throws IOException { Object result = defaultMarshal.unmarshalFrom(runtime, type, unmarshalStream); ((RubySet) result).unmarshal(); return result; }
public final Object unmarshal(UnmarshalStream unmarshalStream) throws IOException { return getMarshal().unmarshalFrom(runtime, this, unmarshalStream); }
public final Object unmarshal(UnmarshalStream unmarshalStream) throws IOException { return getMarshal().unmarshalFrom(runtime, this, unmarshalStream); }
public final Object unmarshal(UnmarshalStream unmarshalStream) throws IOException { return getMarshal().unmarshalFrom(runtime, this, unmarshalStream); }
public final Object unmarshal(UnmarshalStream unmarshalStream) throws IOException { return getMarshal().unmarshalFrom(runtime, this, unmarshalStream); }
public Object unmarshalFrom(Ruby runtime, RubyClass type, UnmarshalStream unmarshalStream) throws IOException { RubyRational r = (RubyRational) RubyClass.DEFAULT_OBJECT_MARSHAL.unmarshalFrom(runtime, type, unmarshalStream); r.num = r.removeInstanceVariable("@numerator"); r.den = r.removeInstanceVariable("@denominator"); return r; } };
public Object unmarshalFrom(Ruby runtime, RubyClass type, UnmarshalStream unmarshalStream) throws IOException { RubyRational r = (RubyRational) RubyClass.DEFAULT_OBJECT_MARSHAL.unmarshalFrom(runtime, type, unmarshalStream); r.num = r.removeInstanceVariable("@numerator"); r.den = r.removeInstanceVariable("@denominator"); return r; } };
@Override public Object unmarshalFrom(Ruby runtime, RubyClass type, UnmarshalStream unmarshalStream) throws IOException { ThreadContext context = runtime.getCurrentContext(); RubyRational r = (RubyRational) RubyClass.DEFAULT_OBJECT_MARSHAL.unmarshalFrom(runtime, type, unmarshalStream); RubyInteger num = intCheck(context, r.removeInstanceVariable("@numerator")); RubyInteger den = intCheck(context, r.removeInstanceVariable("@denominator")); // MRI: nurat_canonicalize, negation part if (canonicalizeShouldNegate(context, den)) { num = num.negate(); den = den.negate(); } r.num = num; r.den = den; return r; } };
@Override public Object unmarshalFrom(Ruby runtime, RubyClass type, UnmarshalStream unmarshalStream) throws IOException { ThreadContext context = runtime.getCurrentContext(); RubyRational r = (RubyRational) RubyClass.DEFAULT_OBJECT_MARSHAL.unmarshalFrom(runtime, type, unmarshalStream); RubyInteger num = intCheck(context, r.removeInstanceVariable("@numerator")); RubyInteger den = intCheck(context, r.removeInstanceVariable("@denominator")); // MRI: nurat_canonicalize, negation part if (canonicalizeShouldNegate(context, den)) { num = num.negate(); den = den.negate(); } r.num = num; r.den = den; return r; } };