P
Pokkai Dokkai
how to ignore warning messages in ruby (when executing ruby code)
how to ignore warning messages in ruby (when executing ruby code)
Quoth Pokkai Dokkai:
Close your eyes and tap your heels thrice.
No, really, ignoring things is as easy as not looking at them. (In all
likelihood you should fix your code to not have warnings instead.)
Alex said:I agree with Konrad that you should probably fix warnings rather than
ignore, but -W is the command line flag you want. -W1 is standard, -
W2 is verbose, -W0 is no warnings whatsoever.
Alex Gutteridge
Bioinformatics Center
Kyoto University
Alex said:-W is the command line flag you want. -W1 is standard, -
W2 is verbose, -W0 is no warnings whatsoever.
-W1 is standard, -W2 is
verbose, -W0 is no warnings whatsoever.
=20
Is there a possibility to ignore warnings dynamically? - I mean,=20
sometimes it's helpful to redefine constants, which will always produce= =20
a warning. I want to suppress warnings for these lines only.
Bertram said:irb(main):001:0> X = "x"
=> "x"
irb(main):002:0> class Object ; remove_const :X ; end
=> "x"
irb(main):003:0> X
NameError: uninitialized constant X
from (irb):3
irb(main):004:0> X = "y"
=> "y"
irb(main):005:0>
Quoth Pokkai Dokkai:
Close your eyes and tap your heels thrice.
No, really, ignoring things is as easy as not looking at them.
Bertram said:Hi,
Am Donnerstag, 11. Okt 2007, 19:22:31 +0900 schrieb Wolfgang Nádasi-Donner:
irb(main):001:0> X = "x"
=> "x"
irb(main):002:0> class Object ; remove_const :X ; end
=> "x"
irb(main):003:0> X
NameError: uninitialized constant X
from (irb):3
irb(main):004:0> X = "y"
=> "y"
irb(main):005:0>
Rick said:Or cover your head with your towel, rubyists should ALWAYS have their
towel handy.
And as the Hitchhiker's Guide to Ruby explains this is also the best
defense against being eaten by the ravenous bugblatter beast of Traal!
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
Konrad said:Quoth Pokkai Dokkai:
Close your eyes and tap your heels thrice.
No, really, ignoring things is as easy as not looking at them. (In all
likelihood you should fix your code to not have warnings instead.)
Regards,
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.