From: Florian Gross Date: 2004-11-19T00:43:12+09:00 Subject: Re: assert Jean-Hugues ROBERT wrote: >> Problem with using assert() for the method name is that test/unit >> already uses it for stating what a test ought to produce. It seems >> likely that you will have test/unit style assert()s and breakpoint >> style assert()s (which I'd like to call assumptions) in the same >> code base. > > I suppose that assert() can still be used. The new version would I > have to figure out that it runs in the context of test/unit. In that > context its behavior would be compatible with test/unit. > > The other contexts that assert() should support are: - production => > throw an exception - debugging => start an irb session - custom > => invoke some user provided assert failure handler This is an interesting idea. I think I will try it out.