@Specialization public RubyRegexp initialize(RubyRegexp regexp, RubyString string) { notDesignedForCompilation(); regexp.initialize(this, string.getBytes()); return regexp; }
@Specialization public Object match(RubyRegexp regexp, RubyString string) { notDesignedForCompilation(); return regexp.matchCommon(string.getBytes(), true, false) != getContext().getCoreLibrary().getNilObject(); }
@Specialization public RubyString escape(RubyString pattern) { notDesignedForCompilation(); return getContext() .makeString( org.jruby.RubyRegexp.quote19(new ByteList(pattern.getBytes()), true).toString()); }
@Specialization public Object match(RubyRegexp regexp, RubyString string) { return regexp.matchCommon(string.getBytes(), false, false); }