diff options
author | Hans de Graaff <graaff@gentoo.org> | 2016-03-11 08:06:13 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2016-03-11 08:06:42 +0100 |
commit | 79aa89ff22755b5b4c9f43bdd3d0bcd3210e45b4 (patch) | |
tree | 5aaff0adef04d47406a76d548917c0df76aeb002 /dev-ruby/rack/files | |
parent | dev-ruby/rack: drop ruby19 (diff) | |
download | gentoo-79aa89ff22755b5b4c9f43bdd3d0bcd3210e45b4.tar.gz gentoo-79aa89ff22755b5b4c9f43bdd3d0bcd3210e45b4.tar.bz2 gentoo-79aa89ff22755b5b4c9f43bdd3d0bcd3210e45b4.zip |
dev-ruby/rack: add ruby23
Backport patch from upstream 2.0.0.alpha for compatibility
with ruby23.
Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-ruby/rack/files')
-rw-r--r-- | dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch b/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch new file mode 100644 index 000000000000..9d36a7328e2c --- /dev/null +++ b/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch @@ -0,0 +1,38 @@ +From 11b5a15dd1c8a41d87eb73df7bb99a3affecd787 Mon Sep 17 00:00:00 2001 +From: deepj <deepjungle.maca@gmail.com> +Date: Mon, 25 May 2015 22:41:31 +0200 +Subject: [PATCH] Clean up Rack::Rewindable + +--- + lib/rack/rewindable_input.rb | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/lib/rack/rewindable_input.rb b/lib/rack/rewindable_input.rb +index 64efdda..dd6b784 100644 +--- a/lib/rack/rewindable_input.rb ++++ b/lib/rack/rewindable_input.rb +@@ -57,15 +57,6 @@ def close + + private + +- # Ruby's Tempfile class has a bug. Subclass it and fix it. +- class Tempfile < ::Tempfile +- def _close +- @tmpfile.close if @tmpfile +- @data[1] = nil if @data +- @tmpfile = nil +- end +- end +- + def make_rewindable + # Buffer all data into a tempfile. Since this tempfile is private to this + # RewindableInput object, we chmod it so that nobody else can read or write +@@ -77,8 +68,6 @@ def make_rewindable + @rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding) + @rewindable_io.binmode + if filesystem_has_posix_semantics? +- # Use ::File.unlink as 1.9.1 Tempfile has a bug where unlink closes the file! +- ::File.unlink @rewindable_io.path + raise 'Unlink failed. IO closed.' if @rewindable_io.closed? + @unlinked = true + end |