public final RubyString makeShared(Ruby runtime, int index, int len) { return makeShared(runtime, getType(), value, index, len); }
private RubyString makeShared(Ruby runtime, ByteList value, int index, int len) { return makeShared(runtime, getType(), value, index, len); }
private RubyString makeShared(Ruby runtime, ByteList value, int index, int len) { return makeShared(runtime, getType(), value, index, len); }
public final RubyString makeShared(Ruby runtime, int index, int len) { return makeShared(runtime, getType(), value, index, len); }
private RubyString makeShared19(Ruby runtime, ByteList value, int index, int len) { return makeShared19(runtime, getType(), value, index, len); }
private RubyString makeShared19(Ruby runtime, ByteList value, int index, int len) { return makeShared19(runtime, getType(), value, index, len); }
/** Create a new String which uses the same Ruby runtime and the same * class like this String. * * This method should be used to satisfy RCR #38. * @deprecated */ @Deprecated public RubyString newString(CharSequence s) { return new RubyString(getRuntime(), getType(), s); }
/** Create a new String which uses the same Ruby runtime and the same * class like this String. * * This method should be used to satisfy RCR #38. * @deprecated */ @Deprecated public RubyString newString(CharSequence s) { return new RubyString(getRuntime(), getType(), s); }
/** Create a new String which uses the same Ruby runtime and the same * class like this String. * * This method should be used to satisfy RCR #38. * @deprecated */ @Deprecated public RubyString newString(CharSequence s) { return new RubyString(getRuntime(), getType(), s); }
/** Create a new String which uses the same Ruby runtime and the same * class like this String. * * This method should be used to satisfy RCR #38. * @deprecated */ @Deprecated public RubyString newString(CharSequence s) { return new RubyString(getRuntime(), getType(), s); }
/** rb_reg_match_pre * */ public static IRubyObject match_pre(IRubyObject match) { if (match.isNil()) return match; RubyMatchData m = (RubyMatchData)match; m.check(); Ruby runtime = m.getRuntime(); if (m.begin == -1) runtime.getNil(); return runtime.is1_9() ? m.str.makeShared19(runtime, m.str.getType(), 0, m.begin).infectBy(m) : m.str.makeShared(runtime, m.str.getType(), 0, m.begin).infectBy(m); }
/** rb_reg_match_pre * */ public static IRubyObject match_pre(IRubyObject match) { if (match.isNil()) return match; RubyMatchData m = (RubyMatchData)match; m.check(); Ruby runtime = m.getRuntime(); if (m.begin == -1) runtime.getNil(); return runtime.is1_9() ? m.str.makeShared19(runtime, m.str.getType(), 0, m.begin).infectBy(m) : m.str.makeShared(runtime, m.str.getType(), 0, m.begin).infectBy(m); }
/** rb_reg_match_post * */ public static IRubyObject match_post(IRubyObject match) { if (match.isNil()) return match; RubyMatchData m = (RubyMatchData)match; m.check(); Ruby runtime = m.getRuntime(); if (m.begin == -1) return runtime.getNil(); return runtime.is1_9() ? m.str.makeShared19(runtime, m.str.getType(), m.end, m.str.getByteList().getRealSize() - m.end).infectBy(m) : m.str.makeShared(runtime, m.str.getType(), m.end, m.str.getByteList().getRealSize() - m.end).infectBy(m); }
/** rb_reg_match_post * */ public static IRubyObject match_post(IRubyObject match) { if (match.isNil()) return match; RubyMatchData m = (RubyMatchData)match; m.check(); Ruby runtime = m.getRuntime(); if (m.begin == -1) return runtime.getNil(); return runtime.is1_9() ? m.str.makeShared19(runtime, m.str.getType(), m.end, m.str.getByteList().getRealSize() - m.end).infectBy(m) : m.str.makeShared(runtime, m.str.getType(), m.end, m.str.getByteList().getRealSize() - m.end).infectBy(m); }
@JRubyMethod(name = {"succ", "next"}, compat = RUBY1_9) public IRubyObject succ19(ThreadContext context) { Ruby runtime = context.runtime; final RubyString str; if (value.getRealSize() > 0) { str = new RubyString(runtime, getMetaClass(), succCommon19(value)); // TODO: rescan code range ? } else { str = newEmptyString(runtime, getType(), value.getEncoding()); } return str.infectBy(this); }
@JRubyMethod(name = {"succ", "next"}) public IRubyObject succ(ThreadContext context) { Ruby runtime = context.runtime; final RubyString str; if (value.getRealSize() > 0) { str = new RubyString(runtime, getMetaClass(), StringSupport.succCommon(runtime, value)); // TODO: rescan code range ? } else { str = newEmptyString(runtime, getType(), value.getEncoding()); } return str.infectBy(this); }
@JRubyMethod(name = {"succ", "next"}, compat = RUBY1_9) public IRubyObject succ19(ThreadContext context) { Ruby runtime = context.runtime; final RubyString str; if (value.getRealSize() > 0) { str = new RubyString(runtime, getMetaClass(), succCommon19(value)); // TODO: rescan code range ? } else { str = newEmptyString(runtime, getType(), value.getEncoding()); } return str.infectBy(this); }
@JRubyMethod(name = {"succ", "next"}) public IRubyObject succ(ThreadContext context) { Ruby runtime = context.runtime; final RubyString str; if (value.getRealSize() > 0) { str = new RubyString(runtime, getMetaClass(), StringSupport.succCommon(runtime, value)); // TODO: rescan code range ? } else { str = newEmptyString(runtime, getType(), value.getEncoding()); } return str.infectBy(this); }