Sha256: c194a2a2f99855ccd9ce00238cb3b1d82f46ad9d193e1bff3068f77f8ae8ef5e

Contents?: true

Size: 159 Bytes

Versions: 2

Compression:

Stored size: 159 Bytes

Contents

require 'stringio'

def capturing_stderr(&block)
  old_stderr, $stderr = $stderr, StringIO.new
  block.call
  $stderr.string
ensure
  $stderr = old_stderr
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/regexp_parser-2.2.0/spec/support/capturing_stderr.rb
regexp_parser-2.2.0 spec/support/capturing_stderr.rb