Class: PatchedStringIO

Inherits:
StringIO
  • Object
show all
Defined in:
lib/webmock/http_lib_adapters/net_http.rb

Overview

patch for StringIO behavior in Ruby 2.2.3 github.com/bblimke/webmock/issues/558

Instance Method Summary collapse

Instance Method Details

#orig_read_nonblockObject

:nodoc:


229
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 229

alias_method :orig_read_nonblock, :read_nonblock

#read_nonblock(size, *args, **kwargs) ⇒ Object


231
232
233
234
# File 'lib/webmock/http_lib_adapters/net_http.rb', line 231

def read_nonblock(size, *args, **kwargs)
  args.reject! {|arg| !arg.is_a?(Hash)}
  orig_read_nonblock(size, *args, **kwargs)
end