Skip to content

chore(ruby): Drop Ruby < 2.6 guard around Net::HTTP#write_timeout - #3213

Draft
sentry-junior[bot] wants to merge 1 commit into
masterfrom
chore/ruby-drop-write-timeout-guard
Draft

sentry-junior[bot] wants to merge 1 commit into
masterfrom
chore/ruby-drop-write-timeout-guard

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Removes an obsolete Ruby-version compatibility guard in Sentry::HTTPTransport#conn.

connection.write_timeout = ... if connection.respond_to?(:write_timeout) came in with #1678 (Jan 2022), when the SDK still supported Ruby versions older than 2.6. Net::HTTP#write_timeout= has been in the stdlib since Ruby 2.6, and every gem here now requires Ruby >= 2.7, so the guard is always true. The matching RUBY_VERSION >= 2.6 branch in http_transport_spec.rb goes too, so the spec always asserts the write timeout.

Nothing breaks on any supported Ruby, including JRuby 9.4. connection is always a ::Net::HTTP built a few lines above, and these two lines are the only write_timeout references in the monorepo. #3212 also touches http_transport.rb, but only the rate-limit handling, not these lines.

No changelog entry: per AGENTS.md, it's generated at release time.

via automation sched_11d0bdec7ab3f4e42d0ea1fc76fbc140 · Run ID sched_11d0bdec7ab3f4e42d0ea1fc76fbc140:1794902400000.

--

View Session [Sentry]

Net::HTTP#write_timeout= exists since Ruby 2.6 and every gem requires
Ruby >= 2.7, so the respond_to? guard and the matching spec version
check are always true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants