From: Robert Klemme Date: 2004-02-25T22:29:52+09:00 Subject: Re: proposal: debug keyword "Simon Strandgaard" schrieb im Newsbeitrag news:pan.2004.02.25.12.16.49.825996@adslhome.dk... > A debug keyword which enables debug-output for a specific method. > I have found its useful when there is many testcases which fails > at the same time, letting me faster identify where the problem is. > > I think this would be a good idea to have distributed with Ruby? > I am thinking of submitting an RCR, should I do this? > > > > Its syntax is > > debug :method [, :method]* > > What it does is to enable the global flag $debug. More precisely it switches all output on or off in a method. And that's what I don't like about it: in your example class A behavior of "puts", "print" etc. changes depending on the $debug flag. That's IMHO not compliant with POLS. I'd prefer to have specialized methods for debug printing. Kind regards robert