示例#1
0
 @Override
 public void copySpecialInstanceVariables(IRubyObject clone) {
   RubyRange range = (RubyRange) clone;
   range.begin = begin;
   range.end = end;
   range.isExclusive = isExclusive;
 }
示例#2
0
        public Object unmarshalFrom(Ruby runtime, RubyClass type, UnmarshalStream unmarshalStream)
            throws IOException {
          RubyRange range = (RubyRange) type.allocate();

          unmarshalStream.registerLinkTarget(range);

          unmarshalStream.defaultVariablesUnmarshal(range);

          range.begin = (IRubyObject) range.removeInternalVariable("begin");
          range.end = (IRubyObject) range.removeInternalVariable("end");
          range.isExclusive = ((IRubyObject) range.removeInternalVariable("excl")).isTrue();

          return range;
        }