summaryrefslogtreecommitdiffstats
path: root/config/initializers/10-patches.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/10-patches.rb')
-rw-r--r--config/initializers/10-patches.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb
index 9af59563e..204caba9a 100644
--- a/config/initializers/10-patches.rb
+++ b/config/initializers/10-patches.rb
@@ -213,3 +213,17 @@ module ActionView
end
end
end
+
+# https://github.com/rack/rack/pull/1703
+# TODO: remove this when Rack is updated to 3.0.0
+require 'rack'
+module Rack
+ class RewindableInput
+ unless method_defined?(:size)
+ def size
+ make_rewindable unless @rewindable_io
+ @rewindable_io.size
+ end
+ end
+ end
+end