@Override public Object interpret( ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { // FIXME (from RegexpNode.java): 1.9 should care about internal or external encoding and not // kcode. // If we have a constant regexp string or if the regexp patterns asks for caching, cache the // regexp if (rubyRegexp == null || !options.isOnce() || context.runtime.getKCode() != rubyRegexp.getKCode()) { RubyString[] pieces = retrievePieces(context, self, currScope, currDynScope, temp); RubyString pattern = RubyRegexp.preprocessDRegexp(context.runtime, pieces, options); RubyRegexp re = RubyRegexp.newDRegexp(context.runtime, pattern, options); re.setLiteral(); rubyRegexp = re; } return rubyRegexp; }