# File lib/rufus/treechecker.rb, line 247
      def check (sexp)

        if sexp.is_a?(Symbol)

          m = @excluded_symbols[sexp]
          raise SecurityError.new(m) if m

        elsif sexp.is_a?(Array)

          # accepted patterns are evaluated before excluded patterns
          # if one is found the excluded patterns are skipped

          pats = @accepted_patterns[sexp.first]
          pats.each { |pat| return if check_pattern(sexp, pat) } if pats

          pats = @excluded_patterns[sexp.first]
          return unless pats

          pats.each do |pat, msg|
            raise SecurityError.new(msg) if check_pattern(sexp, pat)
          end
        end
      end