Forum: Ruby read ruby's flag

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8c786b59665b31d9e43da6c5e6315a4d?d=identicon&s=25 Mohammad Khan (Guest)
on 2005-12-23 17:35
(Received via mailing list)
To read ruby's --verbose flag, I can read $VERBOSE from code,
What is the variable name to read '-W level' (warning level)?

Thanks,
Mohammad Khan
0f07a2117ccce0aa66069cb31d22168f?d=identicon&s=25 Antonio Cangiano (Guest)
on 2005-12-23 18:53
(Received via mailing list)
Mohammad Khan wrote:
> To read ruby's --verbose flag, I can read $VERBOSE from code,
> What is the variable name to read '-W level' (warning level)?

Hi Mohammad,
$-w (or $VERBOSE) will give you:
-W0 -> nil
No option or -W1 -> false
-W2 -> true

HTH
This topic is locked and can not be replied to.