File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1212 needs : ruby-verions
1313 name : build (${{ matrix.ruby }} / ${{ matrix.os }})
1414 strategy :
15+ fail-fast : false
1516 matrix :
1617 ruby : ${{ fromJson(needs.ruby-verions.outputs.versions) }}
1718 os : [ ubuntu-latest, macos-latest, windows-latest ]
Original file line number Diff line number Diff line change @@ -54,6 +54,16 @@ def ssl_socket_connect(s, timeout)
5454 s . connect
5555 end
5656 end
57+
58+ tcp_socket_parameters = TCPSocket . instance_method ( :initialize ) . parameters
59+ TCP_SOCKET_NEW_HAS_OPEN_TIMEOUT = if tcp_socket_parameters != [ [ :rest ] ]
60+ tcp_socket_parameters . include? ( [ :key , :open_timeout ] )
61+ else
62+ # Use Socket.tcp to find out since there is no parameters information for TCPSocket#initialize
63+ # See discussion in https://github.com/ruby/net-http/pull/224
64+ Socket . method ( :tcp ) . parameters . include? ( [ :key , :open_timeout ] )
65+ end
66+ private_constant :TCP_SOCKET_NEW_HAS_OPEN_TIMEOUT
5767 end
5868
5969
You can’t perform that action at this time.
0 commit comments