From: ynnor@...
Date: 2016-02-26T11:18:06+00:00
Subject: [ruby-core:74007] [Ruby trunk Bug#12114] $VERBOSE = true is being	ignored

Issue #12114 has been reported by Ronald Fischer.

----------------------------------------
Bug #12114: $VERBOSE = true is being ignored
https://bugs.ruby-lang.org/issues/12114

* Author: Ronald Fischer
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-cygwin]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
This programm correctly complains about "assigned but unused variable - p"

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

However, this one doesn't

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

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



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>