Sha256: 9372815de3c7db4383e4e3b13c65af2562cc65b5ce42af7d4af9c67ce55284c2

Contents?: true

Size: 159 Bytes

Versions: 9

Compression:

Stored size: 159 Bytes

Contents

module Kernel
  def assert(condition, message = nil, error: RuntimeError)
    return if condition
    raise error.new(message || 'assertion failed')
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
donjon-2.0.1 lib/core_ext/assert.rb
donjon-2.0.0 lib/core_ext/assert.rb
donjon-1.0.1 lib/core_ext/assert.rb
donjon-1.0.0 lib/core_ext/assert.rb
donjon-0.0.5 lib/core_ext/assert.rb
donjon-0.0.4 lib/core_ext/assert.rb
donjon-0.0.3 lib/core_ext/assert.rb
donjon-0.0.2 lib/core_ext/assert.rb
donjon-0.0.1 lib/core_ext/assert.rb