/** match_to_s */ @JRubyMethod(name = "to_s") @Override public IRubyObject to_s() { check(); IRubyObject ss = RubyRegexp.last_match(this); if (ss.isNil()) ss = RubyString.newEmptyString(getRuntime()); if (isTaint()) ss.setTaint(true); return ss; }
@Override public IRubyObject get() { return RubyRegexp.last_match( runtime.getCurrentContext().getCurrentScope().getBackRef(runtime)); }