We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d24996 commit 5c6293cCopy full SHA for 5c6293c
core/src/main/java/org/jruby/ext/digest/RubyDigest.java
@@ -39,6 +39,7 @@
39
import java.util.HashMap;
40
import java.util.Map;
41
42
+import org.jcodings.specific.USASCIIEncoding;
43
import org.jruby.Ruby;
44
import org.jruby.RubyClass;
45
import org.jruby.RubyFixnum;
@@ -146,7 +147,7 @@ private static ByteList toHex(byte[] val) {
146
147
}
148
149
private static IRubyObject toHexString(Ruby runtime, byte[] val) {
- return RubyString.newStringNoCopy(runtime, ByteList.plain(toHex(val)));
150
+ return RubyString.newStringNoCopy(runtime, new ByteList(ByteList.plain(toHex(val)), USASCIIEncoding.INSTANCE));
151
152
153
@JRubyMethod(name = "hexencode", required = 1, meta = true)
0 commit comments