Repository navigation
chore(ruby): Drop Ruby < 2.6 guard around Net::HTTP#write_timeout - #3213
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 matchingRUBY_VERSION >= 2.6branch inhttp_transport_spec.rbgoes too, so the spec always asserts the write timeout.Nothing breaks on any supported Ruby, including JRuby 9.4.
connectionis always a::Net::HTTPbuilt a few lines above, and these two lines are the onlywrite_timeoutreferences in the monorepo. #3212 also toucheshttp_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 IDsched_11d0bdec7ab3f4e42d0ea1fc76fbc140:1794902400000.--
View Session [Sentry]