make code in suppress_warnings.rb more concise