How to suppress World Writable message

J

Jim Freeze

Hi

Matz mentioned that to supress the world writable message
(other than to actually fix the problem) was to use the
'-W0' option when calling ruby. (#!/usr/bin/ruby -W0)

Is there a way to set this inside ruby?
 
J

Jim Freeze

$-w = nil
works for me.

Thanks. I guess I didn't try enough cases:

ruby -W0 -e 'p $-w'
nil
ruby -W1 -e 'p $-w'
false
ruby -W2 -e 'p $-w'
true
ruby -W3 -e 'p $-w'
true


BTW, is there a more readable version instead of the Perlism?
 
W

WATANABE Hirofumi

Hi,

Jim Freeze said:
ruby -W0 -e 'p $-w'
nil
ruby -W1 -e 'p $-w'
false
ruby -W2 -e 'p $-w'
true
ruby -W3 -e 'p $-w'
true


BTW, is there a more readable version instead of the Perlism?

% ruby -W0 -e 'p $VERBOSE'
nil
% ruby -W1 -e 'p $VERBOSE'
false
% ruby -W2 -e 'p $VERBOSE'
true
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top