diff options
| author | Kazuki Yamaguchi <k@rhe.jp> | 2025-12-13 17:30:21 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-12-17 15:47:43 +0900 |
| commit | b80fc8bd84d194fdab60d0aee14ce0850a366500 (patch) | |
| tree | 9b103234b8fbfaa26f72fd8cefdc254c9fee9b56 /lib | |
| parent | fedafec78b2e6aa17a4246192a40192d7a0cf69c (diff) | |
[ruby/net-http] Freeze more constants for Ractor compatibility
Freeze Net::HTTP::SSL_ATTRIBUTES and IDEMPOTENT_METHODS_. Both constants
have been marked as :nodoc:.
Together with https://github.com/ruby/openssl/issues/521, this enables
HTTPS clients in non-main Ractors on Ruby 4.0.
https://github.com/ruby/net-http/commit/f24b3b358b
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/net/http.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 4ce8a2c874..3bed9dc3a9 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1531,7 +1531,7 @@ module Net #:nodoc: :verify_depth, :verify_mode, :verify_hostname, - ] # :nodoc: + ].freeze # :nodoc: SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym }.freeze # :nodoc: @@ -2430,7 +2430,7 @@ module Net #:nodoc: # :stopdoc: - IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/ # :nodoc: + IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/.freeze # :nodoc: def transport_request(req) count = 0 |
