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.
URI::SCP#optionscaches nested mutable values.dupshallow-copies that cache, so modifying arrays or hashes through the duplicate changes the original URI options.A release-compatible
initialize_copycorrection 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.