From: h.fulton@... Date: 2000-03-31T16:21:15+00:00 Subject: [ruby-talk:02300] Re: DBC See below. > > > I thought of some elaborate hare-brained Rube Goldberg > > device whereby a method is aliased and renamed or > > whatever, so that when you call the "bare" method > > foobar, you really end up calling meta_foobar, which > > calls pre, then foobar, then post. > > My Rube-Goldberg attempt used tracefunc to hook into the dispatcher, > so that I could check every method call and see if a pre/post condition > existed and then call it. This also gave me the opportunity to call > invariant on exit from every method call. > > /\ndy > I was LOOKING for a mechanism like that! How did you know it existed? From digging in the code or what? I can find no reference to tracefunc in the reference, and the (more easily searched) FAQ definitely doesn't mention it. I will go look at the C source for more information. After all, it even documents the bugs... :) Right, Matz? Thanks, Hal