Improve check for paths as Hashes in CaptureOptions #582
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Thanks for the awesome project!
This is my first PR and my Ruby is a little bit rusty, so please excuse any idiosyncrasies! I'm also running windows locally so I couldn't get the whole dev environment up and running to test everything before pushing, but I'll fix up whatever Travis finds.
Without knowing a whole lot about how this was supposed to be working, hopefully I've captured the intent of the code a bit better and fixed the issue reported in #536 at the same time.
I went for options.fetch so that it raised a KeyError, because I figured it'd make it more obvious that you're supposed to provide a
path
key if your path is a hash, rather than silently returning nil.Fixes #536 and #466