Sha256: 9767b291e3316a4997ccc4fdf3f145ebb77c41dd659b10bfd68b66126c36fdd7
Contents?: true
Size: 468 Bytes
Versions: 24
Compression:
Stored size: 468 Bytes
Contents
module Kernel def silence_warnings with_warnings(nil) { yield } end def silence_stream(stream) old_stream = stream.dup stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null') stream.sync = true yield ensure stream.reopen(old_stream) end def with_warnings(flag) old_verbose, $VERBOSE = $VERBOSE, flag yield ensure $VERBOSE = old_verbose end end unless Kernel.respond_to? :silence_warnings
Version data entries
24 entries across 24 versions & 1 rubygems