Skip to content
Browse files

Assume ASCII-8BIT for strings unpacking with 'm'

  • Loading branch information...
1 parent d0221d9 commit 0fcf96b01f5a7646da2b8d9a49e4696b8164f02c @enebo enebo committed with yokolet
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/org/jruby/util/Pack.java
View
6 src/org/jruby/util/Pack.java
@@ -1127,7 +1127,8 @@ else if (encode.hasRemaining()) {
lElem[index++] = (byte)((b << 4 | c >> 2) & 255);
}
}
- result.append(RubyString.newString(runtime, new ByteList(lElem, 0, index, encoding, false)));
+ result.append(RubyString.newString(runtime, new ByteList(lElem, 0, index,
+ ASCIIEncoding.INSTANCE, false)));
}
break;
@@ -1162,7 +1163,8 @@ else if (encode.hasRemaining()) {
lElem[index++] = value;
}
}
- result.append(RubyString.newString(runtime, new ByteList(lElem, 0, index, encoding, false)));
+ result.append(RubyString.newString(runtime, new ByteList(lElem, 0, index,
+ ASCIIEncoding.INSTANCE, false)));
}
break;
case 'U' :

0 comments on commit 0fcf96b

Please sign in to comment.
Something went wrong with that request. Please try again.