> -----Original Message-----
> From: Kirk Haines [mailto:khaines / enigo.com] 

> [...nice breakdown...]

> a.inject([]) {|arr,elem| arr | elem}

a.flatten.uniq ?

> [...]
> Something like this, probably:
> 
> class User
>   def files
>     groups.inject([]) {|all_files, some_files|  all_files | 
> some_files}
>   end
> end

Should be equivalent to:

groups.flatten.uniq 

But does probably not work because (as you explained)

"...And each of the elements in that array, if you 
call files() on it, returns another array"

class User
  def files
    groups.inject([]) {|all_files, group|  all_files | group.files}
  end
end

> Hope this helps,
> 
> 
> Kirk Haines
 
cheers

Simon