Skip to content

Isolate parsed SCP URI options when duplicating a URI #100

Description

@OskarEichler

URI::SCP#options caches nested mutable values. dup shallow-copies that cache, so modifying arrays or hashes through the duplicate changes the original URI options.

A release-compatible initialize_copy correction clears and rebuilds the cache from the duplicated query. The duplicate and original then own independent parsed option graphs while normal query-cache behavior remains unchanged.

Dual-Ruby models reproduce the original gaining duplicate-only nested edits before and remaining unchanged after; the unchanged suite passes 36 tests /70 assertions on both Rubies. This is an issue-first report because the README requests regression tests while the consumer audit explicitly forbids modifying repository tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions