Sha256: 40755541f4a06f501947f4133b9f5d710148e3ceecacb15428698b71e461690c

Contents?: true

Size: 265 Bytes

Versions: 11

Compression:

Stored size: 265 Bytes

Contents

module Kernel
  def capture_stdout
    out = StringIO.new
    $stdout = out
    yield
    return out
  ensure
    $stdout = STDOUT
  end

  def capture_stderr
    out = StringIO.new
    $stderr = out
    yield
    return out
  ensure
    $stderr = STDERR
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
luffa-2.1.0 lib/luffa/patches/kernel.rb
luffa-2.0.0 lib/luffa/patches/kernel.rb
luffa-1.1.0 lib/luffa/patches/kernel.rb
luffa-1.0.7 lib/luffa/patches/kernel.rb
luffa-1.0.6 lib/luffa/patches/kernel.rb
luffa-1.0.5 lib/luffa/patches/kernel.rb
luffa-1.0.4 lib/luffa/patches/kernel.rb
luffa-1.0.3 lib/luffa/patches/kernel.rb
luffa-1.0.2 lib/luffa/patches/kernel.rb
luffa-1.0.1 lib/luffa/patches/kernel.rb
luffa-1.0.0 lib/luffa/patches/kernel.rb