Sha256: 764ebc5fccd2bc846bae14200cbb24c4a3292d3daae9f7aad79c878c3654f0f2

Contents?: true

Size: 356 Bytes

Versions: 8

Compression:

Stored size: 356 Bytes

Contents

# Support code for running stuff with warnings disabled or enabled
module Kernel
  def with_verbose_disabled
    verbose, $VERBOSE = $VERBOSE, nil
    result = yield
    $VERBOSE = verbose
    return result
  end

  def with_verbose_enabled
    verbose, $VERBOSE = $VERBOSE, true
    begin
      yield
    ensure
      $VERBOSE = verbose
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/lib/puppet_spec/verbose.rb
puppet-8.3.0-x86-mingw32 spec/lib/puppet_spec/verbose.rb
puppet-8.3.0-x64-mingw32 spec/lib/puppet_spec/verbose.rb
puppet-8.3.0-universal-darwin spec/lib/puppet_spec/verbose.rb
puppet-8.3.1 spec/lib/puppet_spec/verbose.rb
puppet-8.3.1-x86-mingw32 spec/lib/puppet_spec/verbose.rb
puppet-8.3.1-x64-mingw32 spec/lib/puppet_spec/verbose.rb
puppet-8.3.1-universal-darwin spec/lib/puppet_spec/verbose.rb