On Mon, Jun 25, 2012 at 1:35 AM, Intransition <[email protected]> wrote: > Have a look: > > module Enumerable > > # Take an associative array and unassociate it. > # > # [[:a,1], [:b,2]].unassociate.to_a #=> [:a, [1], :b, [2]] > # [[:a,1], [:b,2]].unassociate(1).to_a #=> [:a, 1, :b, 2] > # > def unassociate(index = 1..-1)
> Other thoughts/ suggestions? What's the use case for this? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
