From: Joel VanderWerf Date: 2008-04-30T01:19:30+09:00 Subject: Re: How to debug Ruby Programs Eivind Eklund wrote: > I find the invariant adding and puts variants to flow over into each > other a bit in practice; I'll often add extra invariants when doing > debugging, and a bunch of output (puts statatements), and then I use > "cvs diff" to find and eliminate the puts statements while committing > the new invariant checks. You can put debug code (invariant checks, and puts), flush with the left margin (unindented). Then these lines can be grepped for with ^\w, more or less. They also stand out when you scan the code visually. This is enough of a reason to choose ruby over python, IMO. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407