Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -2228,7 +2228,7 @@ public ClearNode(RubyContext context, SourceSection sourceSection) {

@Specialization
public DynamicObject clear(DynamicObject string) {
ByteList empty = ByteList.EMPTY_BYTELIST;
ByteList empty = new ByteList(0);
empty.setEncoding(Layouts.STRING.getByteList(string).getEncoding());
Layouts.STRING.setByteList(string, empty);
return string;

0 comments on commit 41d4a6a

Please sign in to comment.