Module: Kernel
- Defined in:
- lib/assert.rb
Overview
Copyright © 2006, 2011 Caleb Clausen Distributed under the terms of Ruby’s license.
Constant Summary collapse
- @@printed =
{}
Instance Method Summary collapse
Instance Method Details
#assert(expr, msg = "assertion failed") ⇒ Object
5 6 7 |
# File 'lib/assert.rb', line 5 def assert(expr,msg="assertion failed") defined? $Debug and $Debug and (expr or raise msg) end |
#fixme(s) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/assert.rb', line 10 def fixme(s) unless @@printed[s] @@printed[s]=1 defined? $Debug and $Debug and $stderr.print "FIXME: #{s}\n" end end |