Skip to content

Commit

Permalink
[Truffle] Last of the regexp interpolation specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Dec 12, 2014
1 parent 9668c24 commit 4bd351c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -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
Expand Down
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion spec/truffle/tags/language/regexp/interpolation_tags.txt

This file was deleted.

0 comments on commit 4bd351c

Please sign in to comment.