-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Duplicate options Hash in .timeout call
When `Hash` is passed to HTTP.timeout, it's been mutated. So when you pass a frozen `Hash` it raises an exception. Here is an example of the code: ``` timeout_settings = { connect: 5, write: 2, read: 10 }.freeze HTTP.timeout(timeout_settings).get('http://example.com') ``` In this change, I have added a call to .dup on options Hash to create a copy and avoid mutation of original Hash.
- Loading branch information
1 parent
427525c
commit 7ce201e
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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