Skip to content

Commit

Permalink
[Truffle] Fix to yield only the invalid characters for ASCII-incompat…
Browse files Browse the repository at this point in the history
…ible encodings in String#scrub.

* JRuby and MRI seem incorrect here, they completely ignore the block given to #scrub.
  • Loading branch information
eregon committed Jan 10, 2017
1 parent b0cf77b commit 6601be9
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1481,7 +1481,7 @@ public DynamicObject scrubAscciIncompatible(VirtualFrame frame, DynamicObject st
}
}

DynamicObject repl = (DynamicObject) yield(frame, block, createString(makeSubstringNode.executeMake(rope, p, e - p)));
DynamicObject repl = (DynamicObject) yield(frame, block, createString(makeSubstringNode.executeMake(rope, p, clen)));
buf = makeConcatNode.executeMake(buf, rope(repl), enc);
p += clen;
p1 = p;
Expand Down

0 comments on commit 6601be9

Please sign in to comment.