From: eregontp@... Date: 2016-01-27T15:58:13+00:00 Subject: [ruby-core:73541] [Ruby trunk - Feature #12026] Support warning filters Issue #12026 has been updated by Benoit Daloze. I think this filter should be "one for the whole execution" and therefore something like an environment variable or a CLI flag. Taking inspiration from javac's -Xlint: [1], having them associated by a group or short name would help to make it more effective across implementations, and maybe distinct mostly harmless warnings from more serious ones which happen to also match that filter. [1] Scroll above http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html#commandlineargfile. ---------------------------------------- Feature #12026: Support warning filters https://bugs.ruby-lang.org/issues/12026#change-56753 * Author: Jeremy Evans * Status: Open * Priority: Normal * Assignee: ---------------------------------------- This adds a simple way to filter warnings from being displayed. You just set a $WARNING_FILTER with a regexp, and any warnings that match the regexp will not be displayed. I think this is a much simpler approach to filtering warnings than feature #11588, while allowing the same type of capability. This is backwards compatible, in that you can set $WARNING_FILTER in previous versions of ruby without problems. This should not cause any performance issues, as the regexp matching isn't done until the warning message is about to be displayed. It's possible to use something other than a global variable to store the warning filter, but a global variable was the easiest way to implement it, it has a global effect, and similar flags such as $VERBOSE are also global variables, so I think a global variable makes sense. ---Files-------------------------------- 0001-Support-warning-filters.patch (4.12 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: