Skip to content

Commit

Permalink
Merge pull request #665 from bblimke/revert-664-revert-663-support_ru…
Browse files Browse the repository at this point in the history
…by_2_4

Revert "Revert "Support Ruby 2.4""
  • Loading branch information
bblimke authored Dec 5, 2016
2 parents 354e5c2 + 29388df commit 8f2176a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/webmock/http_lib_adapters/net_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def closed?
@closed ||= true
end

def close
end

def readuntil(*args)
end

Expand All @@ -253,7 +256,7 @@ def readuntil(*args)
module Net #:nodoc: all

class WebMockNetBufferedIO < BufferedIO
def initialize(io, debug_output = nil)
def initialize(io, read_timeout: 60, continue_timeout: nil, debug_output: nil)
@read_timeout = 60
@rbuf = ''
@debug_output = debug_output
Expand Down
2 changes: 1 addition & 1 deletion lib/webmock/request_stub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def then
end

def times(number)
raise "times(N) accepts integers >= 1 only" if !number.is_a?(Fixnum) || number < 1
raise "times(N) accepts integers >= 1 only" if !number.is_a?(Integer) || number < 1
if @responses_sequences.empty?
raise "Invalid WebMock stub declaration." +
" times(N) can be declared only after response declaration."
Expand Down

0 comments on commit 8f2176a

Please sign in to comment.