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.
Mohammad K. (Guest)
on 2005-12-23 18: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 K.
Antonio C. (Guest)
on 2005-12-23 19:53
(Received via mailing list)
Mohammad K. 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.