diff --git a/src/main/java/org/jruby/rack/ext/Input.java b/src/main/java/org/jruby/rack/ext/Input.java index 2cdd8e3c3..3824e4fd5 100644 --- a/src/main/java/org/jruby/rack/ext/Input.java +++ b/src/main/java/org/jruby/rack/ext/Input.java @@ -43,25 +43,6 @@ */ @SuppressWarnings("serial") public class Input extends RubyObject { - private static final MethodHandle CONCAT_WITH_CODERANGE; - - static { - // set up coderange-aware concat that works with the new catWithCodeRange as well as earlier JRuby without it. - // TODO: remove and replace with direct call once 9.3 is fully unsupported - MethodHandle catWithCR = null; - MethodHandles.Lookup lookup = MethodHandles.publicLookup(); - try { - catWithCR = lookup.findVirtual(RubyString.class, "catWithCodeRange", MethodType.methodType(int.class, ByteList.class, int.class)); - } catch (NoSuchMethodException | IllegalAccessException e) { - try { - catWithCR = lookup.findVirtual(RubyString.class, "cat19", MethodType.methodType(int.class, ByteList.class, int.class)); - } catch (Exception t) { - Helpers.throwException(t); - } - } - CONCAT_WITH_CODERANGE = catWithCR; - } - static final ObjectAllocator ALLOCATOR = new ObjectAllocator() { public IRubyObject allocate(Ruby runtime, RubyClass klass) { return new Input(runtime, klass); @@ -172,7 +153,7 @@ public IRubyObject read(final ThreadContext context, final IRubyObject[] args) { if ( buffer != null ) { buffer.clear(); try { - int unused = (int) CONCAT_WITH_CODERANGE.invokeExact(buffer, new ByteList(bytes, false), StringSupport.CR_UNKNOWN); + int unused = buffer.cat19(new ByteList(bytes, false), StringSupport.CR_UNKNOWN); } catch (Throwable t) { Helpers.throwException(t); } diff --git a/src/main/ruby/jruby/rack/version.rb b/src/main/ruby/jruby/rack/version.rb index 60322830f..86e2bce5f 100644 --- a/src/main/ruby/jruby/rack/version.rb +++ b/src/main/ruby/jruby/rack/version.rb @@ -7,6 +7,6 @@ module JRuby module Rack - VERSION = '1.2.2' + VERSION = '1.2.2.kvp5' end end