<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: into code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 18 May 2008 14:38:37 GMT</pubDate>
    <description>DZone Snippets: into code</description>
    <item>
      <title>Convert two Arrays into one Hash (Ruby)</title>
      <link>http://snippets.dzone.com/posts/show/4932</link>
      <description>This is a way to merge two arrays into one hash.&lt;br /&gt;The returned hash will have the same quantity of elements that the first(self) array. &lt;br /&gt;&lt;br /&gt;class Array&lt;br /&gt; def merge_into_hash(anArray)&lt;br /&gt;  tmp,hash = anArray.dup,{}&lt;br /&gt;  self.each {|key| hash[key] = tmp.shift}&lt;br /&gt;  hash&lt;br /&gt; end&lt;br /&gt;end</description>
      <pubDate>Fri, 28 Dec 2007 18:58:36 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4932</guid>
      <author>jmrepetti (Juan Matias)</author>
    </item>
  </channel>
</rss>
