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