From: Robert Klemme Date: 2004-08-26T23:50:39+09:00 Subject: Re: Turning Off Warnings In Code "Mauricio Fern�ndez" schrieb im Newsbeitrag news:20040825190102.GA26316@student.ei.uni-stuttgart.de... > On Thu, Aug 26, 2004 at 03:49:54AM +0900, Sean O'Dell wrote: > > This seems like something really simple, but I can't figure out it's done. > > > > How do you turn warnings off in code? Meaning, not launching Ruby with -w0, > > just turning them off with Ruby code. > > $VERBOSE = nil Or how about: module Kernel private def no_warn old = $VERBOSE begin yield ensure $VERBOSE = old end end end Both variants don't seem to help agains syntax warnings though (which is completely logical if you keep in mind when they appear). Kind regards robert