We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb39810 commit a2277b1Copy full SHA for a2277b1
core/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
@@ -440,8 +440,10 @@ public DowncaseNode(DowncaseNode prev) {
440
@Specialization
441
public RubyString downcase(RubyString string) {
442
notDesignedForCompilation();
443
+ ByteList newByteList = ByteList.create(string.toString().toLowerCase());
444
+ newByteList.setEncoding(string.getBytes().getEncoding());
445
- return string.getContext().makeString(string.toString().toLowerCase());
446
+ return string.getContext().makeString(newByteList);
447
}
448
449
0 commit comments