Sha256: 1b0bf60c959b2f0b874fd35cbfc23bf9e3514b2bcc579f94c8b10bab08ea1dc3

Contents?: true

Size: 157 Bytes

Versions: 6

Compression:

Stored size: 157 Bytes

Contents

# frozen_string_literal: true
def capture_warning
  old_stderr = $stderr
  $stderr = StringIO.new
  yield
  $stderr.string
ensure
  $stderr = old_stderr
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
http-2.2.2 spec/support/capture_warning.rb
http-2.2.1 spec/support/capture_warning.rb
http-2.2.0 spec/support/capture_warning.rb
http-2.1.0 spec/support/capture_warning.rb
http-2.0.3 spec/support/capture_warning.rb
http-2.0.2 spec/support/capture_warning.rb