Sha256: 195c8e64ecd53a36fdb907595c38c86c86151457cecbdaa7ff005f17827ec34c
Contents?: true
Size: 362 Bytes
Versions: 16
Compression:
Stored size: 362 Bytes
Contents
module Excavate module Utils module_function def silence_stream(stream) old_stream = stream.dup stream.reopen(RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ ? "NUL:" : "/dev/null") # rubocop:disable Performance/RegexpMatch, Metrics/LineLength stream.sync = true yield ensure stream.reopen(old_stream) end end end
Version data entries
16 entries across 16 versions & 1 rubygems