We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdf35f7 commit 2b7953dCopy full SHA for 2b7953d
test/helper.rb
@@ -5,6 +5,8 @@
5
require "logger"
6
require "stringio"
7
8
+(class Random; def self.rand(*args) super end; end) unless defined?(Random)
9
+
10
begin
11
require "ruby-debug"
12
rescue LoadError
test/internals_test.rb
@@ -361,7 +361,7 @@ def af_family_supported(af)
361
362
tries = 5
363
364
- sa = Socket.pack_sockaddr_in(Random.rand(1024..65000), hosts[af])
+ sa = Socket.pack_sockaddr_in(1024 + Random.rand(63076), hosts[af])
365
s.bind(sa)
366
rescue Errno::EADDRINUSE => e
367
tries -= 1
0 commit comments