From: Christer Nilsson Date: 2005-12-07T02:06:44+09:00 Subject: Re: How can I find __LINE__ on the execution stack ? bob.news wrote: > if do_test? > def assert() > raise AssertionError unless yield > end > else > def assert() end > end > > assert { foo > 10 } > > IIRC there is already an assert method that works exactly this way. > > Kind regards > > robert Robert, I guess this is a minimalistic approach. I will see the info I need in the uncatched error. I introduced my own assert, because of the timings. But since I switched to ArachnoRuby there is no need to avoid test/unit. Anyway, your trick can be handy too. I'll save it in my tool chest. Christer -- Posted via http://www.ruby-forum.com/.