Skip to content

Commit

Permalink
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/string/chomp_tags.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
fails:String#chomp removes the final carriage return, newline from a multibyte String
fails:String#chomp removes the final carriage return, newline from a non-ASCII String
fails:String#chomp removes the final carriage return, newline from a non-ASCII String when the record separator is changed
fails:String#chomp! removes the final carriage return, newline from a multibyte String
fails:String#chomp! removes the final carriage return, newline from a non-ASCII String
fails:String#chomp! removes the final carriage return, newline from a non-ASCII String when the record separator is changed
Original file line number Diff line number Diff line change
@@ -328,8 +328,8 @@ public Object stringChrAt(RubyString string, int byteIndex) {
return nil();
}

final int p = bytes.getBegin();
final int end = p + bytes.getRealSize();
final int p = bytes.getBegin() + byteIndex;
final int end = bytes.getBegin() + bytes.getRealSize();
final int c = StringSupport.preciseLength(bytes.getEncoding(), bytes.getUnsafeBytes(), p, end);

if (! StringSupport.MBCLEN_CHARFOUND_P(c)) {

0 comments on commit 2b4851a

Please sign in to comment.