Skip to content
Permalink
Browse files
[Truffle] Dup String#b.
  • Loading branch information
chrisseaton committed Dec 21, 2014
1 parent 766148d commit 0fe40912c31ba7b68fbab1aabec20b6ce8b5a3b3
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
@@ -277,7 +277,7 @@ public BNode(BNode prev) {

@Specialization
public RubyString b(RubyString string) {
final ByteList bytes = string.getBytes();
final ByteList bytes = string.getBytes().dup();
bytes.setEncoding(ASCIIEncoding.INSTANCE);
return getContext().makeString(bytes);
}

0 comments on commit 0fe4091

Please sign in to comment.