Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 10, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nobu and others added 13 commits November 10, 2025 01:52
…out:) when available

This patch replaces the implementation of #open_timeout from Timeout.timeout from the builtin timeout in TCPSocket.open, which was introduced in Ruby 3.5 (https://bugs.ruby-lang.org/issues/21347).

The builtin timeout in TCPSocket.open is better in several ways than Timeout.timeout. It does not rely on a separate Ruby Thread for monitoring Timeout (which is what the timeout library internally does).

Furthermore, it is compatible with Ractors, as opposed to Timeout.timeout (it internally uses Thread::Mutex which can not be used in non-main Ractors).
This change allows the following code to work.

    require 'net/http'
    Ractor.new {
      uri = URI('http://example.com/')
      http = Net::HTTP.new(uri.host, uri.port)
      http.open_timeout = 1
      http.get(uri.path)
    }.value

In Ruby <3.5 environments where `TCPSocket.open` does not have the `open_timeout` option, I have kept the behavior unchanged. net/http will use `Timeout.timeout { TCPSocket.open }`.

ruby/net-http@728eb8fc42
For open_timeout support detection, the previous implementation relied
on an ArgumentError being raised and then rescued. In Ruby, rescue is a
rather expensive operation and should be avoided when possible.

This patch reduces the number of begin-rescues by remembering if the
TCPSocket implementation supports open_timeout.

ruby/net-http@06d982f3a1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
It was bound to `module Gem`, instead of `module Deprecate`.

ruby/rubygems@da29f74ba1
Use `<tt>` instead of `+` that cannot enclose punctuations.

ruby/rubygems@f84035c0b6
@pull pull bot locked and limited conversation to collaborators Nov 10, 2025
@pull pull bot added the ⤵️ pull label Nov 10, 2025
@pull pull bot merged commit 57f2ac7 into turkdevops:master Nov 10, 2025
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants