Skip to content

Commit

Permalink
Use cat19 for 1.1 branch that will fade away soon
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
headius committed Jun 17, 2024
1 parent cbee8b5 commit 5d81b71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/jruby/rack/RackInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.ByteList;
import org.jruby.util.StringSupport;

/**
* Native (Java) implementation of a Rack input.
Expand Down Expand Up @@ -147,7 +148,7 @@ public IRubyObject read(ThreadContext context, IRubyObject[] args) {
if (bytes != null) {
if (string != null) {
string.clear();
string.cat(bytes);
string.cat19(new ByteList(bytes, false), StringSupport.CR_UNKNOWN);
return string;
}
return getRuntime().newString(new ByteList(bytes));
Expand Down

0 comments on commit 5d81b71

Please sign in to comment.