Sha256: 3f4c9f0c3d6b4b39d45d3531ddab28cc05cbaf289741b1e132534ef79d9f78e1
Contents?: true
Size: 288 Bytes
Versions: 13
Compression:
Stored size: 288 Bytes
Contents
require 'stringio' def capture(*streams) streams.map! { |stream| stream.to_s } begin result = StringIO.new streams.each { |stream| eval "$#{stream} = result" } yield ensure streams.each { |stream| eval("$#{stream} = #{stream.upcase}") } end result.string end
Version data entries
13 entries across 13 versions & 1 rubygems