Blame SOURCES/ruby-2.7.0-Remove-RubyGems-dependency.patch

622cf5
From 6532dbecf36d1f24dab1f2143afd171e0b7699eb Mon Sep 17 00:00:00 2001
622cf5
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
622cf5
Date: Wed, 4 Sep 2019 15:07:07 +0200
622cf5
Subject: [PATCH] Remove RubyGems dependency.
622cf5
622cf5
Since `Process::RLIMIT_NOFILE` is platform specific, better to use Ruby
622cf5
introspection than detecting platform.
622cf5
---
622cf5
 .../vendor/net-http-persistent/lib/net/http/persistent.rb   | 6 +++---
622cf5
 1 file changed, 3 insertions(+), 3 deletions(-)
622cf5
622cf5
diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
622cf5
index a54be2a..06739f1 100644
622cf5
--- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
622cf5
+++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
622cf5
@@ -197,10 +197,10 @@ class Bundler::Persistent::Net::HTTP::Persistent
622cf5
   ##
622cf5
   # The default connection pool size is 1/4 the allowed open files.
622cf5
 
622cf5
-  if Gem.win_platform? then
622cf5
-    DEFAULT_POOL_SIZE = 256
622cf5
-  else
622cf5
+  if Process.const_defined? :RLIMIT_NOFILE
622cf5
     DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4
622cf5
+  else
622cf5
+    DEFAULT_POOL_SIZE = 256
622cf5
   end
622cf5
 
622cf5
   ##
622cf5
-- 
622cf5
2.23.0
622cf5