Sha256: 7f0b6eb5a68a157443429b5c1741ca8463b1d6ad85e83f488db03112c81bdd22

Contents?: true

Size: 542 Bytes

Versions: 46

Compression:

Stored size: 542 Bytes

Contents

# @private
module ::Kernel
  unless method_defined?(:silence_warnings)
    def silence_warnings
      with_warnings(nil) { yield }
    end
  end

  unless method_defined?(:with_warnings)
    def with_warnings(flag)
      old_verbose, $VERBOSE = $VERBOSE, flag
      yield
    ensure
      $VERBOSE = old_verbose
    end
  end
end

# @private
class ::Exception
  unless method_defined?(:to_std_format)
    def to_std_format
      ary = ["#{self.class}: #{message}"]
      ary.concat(backtrace || [])
      ary.join("\n\t")
    end
  end
end


Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
zookeeper-1.3.0 lib/zookeeper/core_ext.rb
zookeeper-1.3.0-java lib/zookeeper/core_ext.rb
zookeeper-1.2.14 lib/zookeeper/core_ext.rb
zookeeper-1.2.14-java lib/zookeeper/core_ext.rb
zookeeper-1.2.13 lib/zookeeper/core_ext.rb
zookeeper-1.2.13-java lib/zookeeper/core_ext.rb
zookeeper-1.2.12 lib/zookeeper/core_ext.rb
zookeeper-1.2.12-java lib/zookeeper/core_ext.rb
zookeeper-1.2.11 lib/zookeeper/core_ext.rb
zookeeper-1.2.11-java lib/zookeeper/core_ext.rb
zookeeper-1.2.10 lib/zookeeper/core_ext.rb
zookeeper-1.2.10-java lib/zookeeper/core_ext.rb
zookeeper-1.2.9 lib/zookeeper/core_ext.rb
zookeeper-1.2.9-java lib/zookeeper/core_ext.rb
zookeeper-1.2.8 lib/zookeeper/core_ext.rb
zookeeper-1.2.8-java lib/zookeeper/core_ext.rb
zookeeper-1.2.7 lib/zookeeper/core_ext.rb
zookeeper-1.2.7-java lib/zookeeper/core_ext.rb
zookeeper-1.2.6 lib/zookeeper/core_ext.rb
zookeeper-1.2.6-java lib/zookeeper/core_ext.rb