Sha256: cc332625c0f5168803e9b311c69329b35d9dc81c1e11475f87a6d47e26c9cf46
Contents?: true
Size: 373 Bytes
Versions: 1
Compression:
Stored size: 373 Bytes
Contents
require 'facets/binding/caller' module Kernel alias_method :assert, :binding end class Binding def / expression if not eval expression the_caller = /\`([^\']+)\'/.match(caller(0).first) m = "unknown" m = the_caller ? the_caller[1] : m raise "Assertion '#{expression}' not satisfied in #{self.self()}##{m}" end self end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
clean_assert-1.1.1 | lib/clean_assert.rb |