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