Interesting...why not just use Set.union()?

http://www.ruby-doc.org/stdlib-1.8.7/libdoc/set/rdoc/Set.html#method-i-union

Trevor


On Fri, Aug 30, 2013 at 7:21 PM, Adrien Thebo <notifications@github.com>wrote:

> In lib/puppet/provider/group/gpasswd.rb:
>
> > +        retval = @resource[:members] | @objectinfo.mem
> > +      else
> > +        retval = @resource[:members]
> > +      end
> > +    else
> > +      retval = @objectinfo.mem
> > +    end
> > +
> > +    retval
> > +  end
> > +
> > +  def members=(members)
> > +    cmd = []
> > +    new_mem = members.dup
> > +    if @resource[:attribute_membership] == :minimum then
> > +      new_mem = new_mem | @objectinfo.mem
>
> We use this at https://github.com/puppetlabs/puppet/pull/1848/files#L0R36as well, and this is a little opaque. It might be a bit more clear to do
> this:
>
> def membership_union(left, right)
>   left | rightend
> # ...
>
>   new_mem = membership_union(new_mem, @objectinfo.mem)
>
> Although I'll admit this is nitpicky, your call on if you would like to do
> this or not.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/puppetlabs/puppet/pull/1848/files#r6098169>
> .
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaughan@onyxpoint.com

-- This account not approved for unencrypted proprietary information --