private static final RegexpCache preprocessedPatternCache = new RegexpCache();
private static Regex makeRegexp(Ruby runtime, ByteList bytes, RegexpOptions options, Encoding enc) {
try {
int p = bytes.getBegin();
return new Regex(bytes.getUnsafeBytes(), p, p + bytes.getRealSize(), options.toJoniOptions(), enc, Syntax.DEFAULT, runtime.getWarnings());
} catch (Exception e) {
if (runtime.is1_9()) {
raiseRegexpError19(runtime, bytes, enc, options, e.getMessage());
} else {
raiseRegexpError(runtime, bytes, enc, options, e.getMessage());