Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/java/org/jruby/ext/stringio/StringIO.java
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ private IRubyObject getline(ThreadContext context, final IRubyObject rs, int lim
}
}
s = p;
while ((p = StringSupport.memchr(stringBytes, p, '\n', e - p)) != -1 && (p != e)) {
while ((p = Helpers.memchr(stringBytes, p, '\n', e - p)) != -1 && (p != e)) {
p++;
if (!((p < e && stringBytes[p] == '\n') ||
(p + 1 < e && stringBytes[p] == '\r' && stringBytes[p+1] == '\n'))) {
Expand All @@ -933,7 +933,7 @@ private IRubyObject getline(ThreadContext context, final IRubyObject rs, int lim
} else if (n == 1) {
RubyString strStr = (RubyString) rs;
ByteList strByteList = strStr.getByteList();
if ((p = StringSupport.memchr(stringBytes, s, strByteList.get(0), e - s)) != -1) {
if ((p = Helpers.memchr(stringBytes, s, strByteList.get(0), e - s)) != -1) {
e = p + 1;
w = (chomp ? ((p > s && stringBytes[p-1] == '\r')?1:0) + 1 : 0);
}
Expand Down
Loading