# File lib/active_ldap/adapter/base.rb, line 151
      def search(options={})
        filter = parse_filter(options[:filter]) || 'objectClass=*'
        attrs = options[:attributes] || []
        scope = ensure_scope(options[:scope] || @scope)
        base = options[:base]
        limit = options[:limit] || 0
        limit = nil if limit <= 0

        attrs = attrs.to_a # just in case

        values = []
        callback = Proc.new do |value, block|
          value = block.call(value) if block
          values << value
        end

        base = ensure_dn_string(base)
        begin
          operation(options) do
            yield(base, scope, filter, attrs, limit, callback)
          end
        rescue LdapError::NoSuchObject, LdapError::InvalidDnSyntax
          # Do nothing on failure
          @logger.info do
            args = [$!.class, $!.message, filter, attrs.inspect]
            _("Ignore error %s(%s): filter %s: attributes: %s") % args
          end
        end

        values
      end