Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7574dbb

Browse files
authored
Merge pull request #6360 from T45K/fix_inconsistency_in_5837
Fix inconsistency in #5837
2 parents 319503e + 7fcca42 commit 7574dbb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/src/main/java/org/jruby/RubySymbol.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,12 @@ public RubySymbol getSymbol(ByteList bytes, ObjBooleanConsumer<RubySymbol> handl
10391039

10401040
if (symbol == null) {
10411041
bytes = bytes.dup();
1042-
return createSymbol(bytes.toString(), bytes, handler, hash, hard);
1042+
return createSymbol(
1043+
RubyEncoding.decodeRaw(bytes),
1044+
bytes,
1045+
handler,
1046+
hash,
1047+
hard);
10431048
}
10441049

10451050
handler.accept(symbol, false);

0 commit comments

Comments
 (0)