def set_warning(type, enabled, pattern=nil, params=[])
      begin
        @warnings.set(type, enabled, pattern, params)
      rescue Warning::WarnException => e
        warn(nil, e.message)
      end
    end
def set_warning(type, enabled, pattern=nil, params=[])
      begin
        @warnings.set(type, enabled, pattern, params)
      rescue Warning::WarnException => e
        warn(nil, e.message)
      end
    end
Enables or disables a particular warning
 or all warnings when type == :all.
 Additionally a filename pattern can be specified.