Skip to content

Commit 5d81b71

Browse files
committed
Use cat19 for 1.1 branch that will fade away soon
This fixes #247 without introducing a dependency on the new catWithCodeRange in JRuby 9.4. It does depend on a now-deprecated method cat19 that will go away in the next year or so.
1 parent cbee8b5 commit 5d81b71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/jruby/rack/RackInput.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.jruby.runtime.ThreadContext;
2828
import org.jruby.runtime.builtin.IRubyObject;
2929
import org.jruby.util.ByteList;
30+
import org.jruby.util.StringSupport;
3031

3132
/**
3233
* Native (Java) implementation of a Rack input.
@@ -147,7 +148,7 @@ public IRubyObject read(ThreadContext context, IRubyObject[] args) {
147148
if (bytes != null) {
148149
if (string != null) {
149150
string.clear();
150-
string.cat(bytes);
151+
string.cat19(new ByteList(bytes, false), StringSupport.CR_UNKNOWN);
151152
return string;
152153
}
153154
return getRuntime().newString(new ByteList(bytes));

0 commit comments

Comments
 (0)