You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/06/15 23:07:35 UTC

[whimsy] 02/02: flip intersection and union

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

commit 0f5732b7573db4826744532ce4257a9c84221fe7
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Jun 15 19:06:25 2016 -0400

    flip intersection and union
---
 lib/whimsy/asf/ldap.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index fcf170b..59a268b 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -780,7 +780,7 @@ module ASF
 
     def remove(people)
       @members = nil
-      people = Array(people - members).map(&:dn)
+      people = Array(people & members).map(&:dn)
       ASF::LDAP.modify(self.dn, [ASF::Base.mod_delete('member', people)])
     ensure
       @members = nil
@@ -788,7 +788,7 @@ module ASF
 
     def add(people)
       @members = nil
-      people = (Array(people) & members).map(&:dn)
+      people = (Array(people) - members).map(&:dn)
       ASF::LDAP.modify(self.dn, [ASF::Base.mod_add('member', people)])
     ensure
       @members = nil

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.