summaryrefslogtreecommitdiffstats
path: root/config/initializers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-05-12 02:36:53 +0000
committerGo MAEDA <maeda@farend.jp>2021-05-12 02:36:53 +0000
commit80c5886fcb958977fa5b959f61c4f30e11c938c7 (patch)
treeffad60d16df2fc2db8770cc5a3ffa3c9f65b0abf /config/initializers
parentba4eda3ebe49cddaea1895d9d3684cef5b705c18 (diff)
downloadredmine-80c5886fcb958977fa5b959f61c4f30e11c938c7.tar.gz
redmine-80c5886fcb958977fa5b959f61c4f30e11c938c7.zip
Merged r20993 from trunk to 4.1-stable (#33752).
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@20995 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/initializers')
-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