How can I achieve the effect of the assert() macro from C in Ruby? In particular, 1. assert(<expr>) will print something like "Assertion failed: <expr>, file <file>, line <line>" only when <expr> evaluates to false, where <file> and <line> refer to the location of the assert() call rather than the location of the assert() definition 2. all asserts are ignored if !$DEBUG, ie., assert(<expr>) does not even evaluate <expr> when !$DEBUG The assert() library is extremely useful in building reliable C code, and it would be nice to have some similar capability in Ruby. Thanks, Eric