From: Dave Thomas Date: 2001-12-20T09:05:07+09:00 Subject: [ruby-talk:29039] Re: What's the Ruby way of doing: furufuru@ccsr.u-tokyo.ac.jp (Ryo Furue) writes: > I think the logic is the same as the "unless $quiet" version. The > following may be more natural than the above: > > $quiet or print "extra info here" for the cases where I need to control conditional debugging for more than simple puts's, I tend to do something like debug do puts a c = e + f(g) puts c end where debug is defined as if $DEBUG def debug; yield; end else def debug; end end Dave