Skip to content

Commit 4bd351c

Browse files
committed
[Truffle] Last of the regexp interpolation specs.
1 parent 9668c24 commit 4bd351c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/src/main/java/org/jruby/truffle/nodes/core/InteroplatedRegexpNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public RubyRegexp executeRubyRegexp(VirtualFrame frame) {
4242
strings[n] = org.jruby.RubyString.newString(getContext().getRuntime(), ((RubyString) toS.call(frame, child, "to_s", null)).getBytes());
4343
}
4444

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

4849
@Override

core/src/main/java/org/jruby/truffle/runtime/core/RubyRegexp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public boolean equals(Object obj) {
381381

382382
public static Regex compile(RubyNode currentNode, RubyContext context, ByteList bytes, int options) {
383383
RubyNode.notDesignedForCompilation();
384-
return compile(currentNode, context, bytes.bytes(), UTF8Encoding.INSTANCE, options);
384+
return compile(currentNode, context, bytes.bytes(), bytes.getEncoding(), options);
385385
}
386386

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

spec/truffle/tags/language/regexp/interpolation_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)