Exemple #1
0
 /** 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;
 }
Exemple #2
0
 @Override
 public IRubyObject get() {
   return RubyRegexp.last_match(
       runtime.getCurrentContext().getCurrentScope().getBackRef(runtime));
 }