Issue #9724 has been reported by Robert A. Heiler.

----------------------------------------
misc #9724: Warnings in Ruby: allow per-file directives to i.e. suppress warnings
https://bugs.ruby-lang.org/issues/9724

* Author: Robert A. Heiler
* Status: Open
* Priority: Low
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
Hi,

A bit of intro.

I usually run all my ruby code with -w. I feel that it gives me some more security if the
ruby parser does not have to think about ambiguous code.

Now this works perfect for my own code - I know what I have written, I know how to fix it,
so my code runs fine.

Problem is other people who do not use the -w switch, and in doing so their stuff outputs
a lot of warnings if I require their project and use them.

This is somewhat annoying and there is no real good way to fix it as far as I know.

Modifying $VERBOSE and setting it to nil is of no real help because it works globally.
But I'd rather want something to be used on a per-file basis.

Would it be possible to enable something that could be used on a per file
basis? Kernel.no_warnings, or Kernel.be_silent or something like this?





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