Skip to content

Commit 0abaa1c

Browse files
committed
Fix the regexp cache key rope to have the correct encoding.
1 parent d01e644 commit 0abaa1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/core/regexp/TruffleRegexpNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ public static Regex compile(RubyLanguage language, RubyDeferredWarnings rubyDefe
962962

963963
if (language.options.REGEXP_INSTRUMENT_CREATION) {
964964
final RegexpCacheKey key = new RegexpCacheKey(
965-
bytes.getRope(),
965+
RopeOperations.withEncoding(bytes.getRope(), enc.jcoding),
966966
enc,
967967
options,
968968
Hashing.NO_SEED);

0 commit comments

Comments
 (0)