Skip to content

Inherit Net::HTTP default configuration in subclasses - #342

Open
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/inherited-default-configuration
Open

Inherit Net::HTTP default configuration in subclasses#342
OskarEichler wants to merge 1 commit into
ruby:masterfrom
OskarEichler:codex/inherited-default-configuration

Conversation

@OskarEichler

Copy link
Copy Markdown

Net::HTTP.default_configuration is a class-instance variable exposed by attr_accessor, so subclasses and generated proxy subclasses silently lose the parent default configuration unless each is assigned separately. Keep the writer and make the reader fall back through the superclass when the subclass has no local override. Explicit subclass overrides, including nil, remain authoritative. The unchanged current suite passes 201 tests / 914 assertions on Ruby 4.0.6 and 199 / 906 on Ruby 3.2.11. External dual-Ruby inheritance models, syntax and diff checks pass. No repository tests were changed.

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.

1 participant