Permalink
Browse files

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

  • Loading branch information...
1 parent ad9ea7f commit e45956974b6c22266e33458f7557689ffae0b03d Joe Van Dyk committed Jan 23, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 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) } &&

0 comments on commit e459569

Please sign in to comment.