Project

General

Profile

Feature #12114

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

This programm correctly complains about "assigned but unused variable - p" 

 ~~~ruby ~~~ 
 #!/usr/bin/ruby -w 
 p=1 
 ~~~ 

 However, this one doesn't 

 ~~~ruby ~~~ 
 #!/usr/bin/ruby 
 BEGIN {$VERBOSE = true} 
 p=1 
 ~~~ 

 Setting `$VERBOSE` $VERBOSE to true in a `BEGIN` BEGIN block should have the same effect as providing it on the command line, but this is obviously not the case.

Back