hi,
   Thank you DUDE it works !

Harold wrote:
> Hi,
> 
> hash = {}
> array1.uniq.each { |d| hash[d] = [] }
> array1.each_with_index { |x,i| hash[x] << array2[i] }
> hash.each_key { |key| hash[key] = hash[key].join('-') }
> hash.inspect # => {"01/01/2009"=>"1stjan1-1stjan2-1stjan3",
> "10/01/2009"=>"10thjan1-10thjan2"}
> 
> Enjoy,
> 
> -Harold
> On Jan 27, 2:13�am, Shankar Ganesh <rails-mailing-l...@andreas-s.net>

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to