Skip to content
Permalink
Browse files
[Truffle] Last of the regexp interpolation specs.
  • Loading branch information
chrisseaton committed Dec 12, 2014
1 parent 9668c24 commit 4bd351cfe582878e28b04f9ce03ffb0b7d5b8986
@@ -42,7 +42,8 @@ public RubyRegexp executeRubyRegexp(VirtualFrame frame) {
strings[n] = org.jruby.RubyString.newString(getContext().getRuntime(), ((RubyString) toS.call(frame, child, "to_s", null)).getBytes());
}

return new RubyRegexp(this, getContext().getCoreLibrary().getRegexpClass(), org.jruby.RubyRegexp.preprocessDRegexp(getContext().getRuntime(), strings, options).getByteList(), options.toOptions());
final org.jruby.RubyString preprocessed = org.jruby.RubyRegexp.preprocessDRegexp(getContext().getRuntime(), strings, options);
return new RubyRegexp(this, getContext().getCoreLibrary().getRegexpClass(), preprocessed.getByteList(), options.toOptions());
}

@Override
@@ -381,7 +381,7 @@ public boolean equals(Object obj) {

public static Regex compile(RubyNode currentNode, RubyContext context, ByteList bytes, int options) {
RubyNode.notDesignedForCompilation();
return compile(currentNode, context, bytes.bytes(), UTF8Encoding.INSTANCE, options);
return compile(currentNode, context, bytes.bytes(), bytes.getEncoding(), options);
}

public static Regex compile(RubyNode currentNode, RubyContext context, byte[] bytes, Encoding encoding, int options) {

This file was deleted.

0 comments on commit 4bd351c

Please sign in to comment.