def modify_attribute(action, key, *values)
      key = Ldaptic.encode(key)
      values.flatten!.map! {|v| Ldaptic.encode(v)}
      @original_attributes[key] ||= []
      virgin   = @original_attributes[key].dup
      original = Ldaptic::AttributeSet.new(self, key, @original_attributes[key])
      original.__send__(action, values)
      begin
        namespace.modify(dn, [[action, key, values]])
      rescue
        @original_attributes[key] = virgin
        raise $!
      end
      if @attributes[key]
        read_attribute(key).__send__(action, values)
      end
      self
    end
def modify_attribute(action, key, *values)
      key = Ldaptic.encode(key)
      values.flatten!.map! {|v| Ldaptic.encode(v)}
      @original_attributes[key] ||= []
      virgin   = @original_attributes[key].dup
      original = Ldaptic::AttributeSet.new(self, key, @original_attributes[key])
      original.__send__(action, values)
      begin
        namespace.modify(dn, [[action, key, values]])
      rescue
        @original_attributes[key] = virgin
        raise $!
      end
      if @attributes[key]
        read_attribute(key).__send__(action, values)
      end
      self
    end
Note the values are not typecast and thus must be strings.