Skip to content

Commit bb3908e

Browse files
eregonandrykonchin
authored andcommitted
Avoid extra byte[] copy
1 parent ade15ef commit bb3908e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/parser/YARPTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2669,7 +2669,7 @@ public RubyNode visitRedoNode(Nodes.RedoNode node) {
26692669
public RubyNode visitRegularExpressionNode(Nodes.RegularExpressionNode node) {
26702670
var encodingAndOptions = getRegexpEncodingAndOptions(new Nodes.RegularExpressionFlags(node.flags));
26712671
var encoding = encodingAndOptions.encoding;
2672-
var source = TruffleString.fromByteArrayUncached(node.unescaped, encoding.tencoding);
2672+
var source = TruffleString.fromByteArrayUncached(node.unescaped, encoding.tencoding, false);
26732673
try {
26742674
final RubyRegexp regexp = RubyRegexp.create(language, source, encoding,
26752675
encodingAndOptions.options, currentNode);

0 commit comments

Comments
 (0)