Created
February 21, 2014 07:45
-
-
Save rkh/9130314 to your computer and use it in GitHub Desktop.
Run Ruby with warnings enabled. Without going crazy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'delegate' | |
module Support | |
class WarningFilter < DelegateClass(IO) | |
def write(line) | |
super if line !~ /^\S+gems\/ruby\-\S+:\d+: warning:/ | |
end | |
end | |
end | |
$stderr = Support::WarningFilter.new($stderr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THANK YOU!