Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix "warning: instance variable @query_params not initialized" warning #151

Merged
merged 1 commit into from

2 participants

@joevandyk

No description provided.

@bblimke
Owner

One warning less. Cheers!

@bblimke bblimke merged commit 2675b10 into bblimke:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/webmock/request_pattern.rb
View
4 lib/webmock/request_pattern.rb
@@ -79,6 +79,10 @@ def initialize(pattern)
end
class URIRegexpPattern < URIPattern
+ def initialize *args, &block
+ @query_params = nil
+ super
+ end
def matches?(uri)
WebMock::Util::URI.variations_of_uri_as_strings(uri).any? { |u| u.match(@pattern) } &&
Something went wrong with that request. Please try again.