Sha256: 1767acbbabd2cb5d7abcc750b7aaed605a4ec8bb7cc7d7b70a81fdbd4486ad38
Contents?: true
Size: 559 Bytes
Versions: 26
Compression:
Stored size: 559 Bytes
Contents
module Kernel # Temporarily turn-off verbose mode while yielding block. # def silently #:yield: old_verbose, $VERBOSE = $VERBOSE, nil begin yield ensure $VERBOSE = old_verbose end end alias_method :silence_warnings, :silently end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCKernel < Test::Unit::TestCase def test_silently silently do assert( ! $VERBOSE ) end end end =end
Version data entries
26 entries across 26 versions & 1 rubygems