Create a Hash from two arrays of different sizes and iterate until none of the keys are empty
<p>Having two arrays of different sizes, I'd like to get the <code>longer</code> array as keys and the <code>shorter</code> one as values. However, I don't want any keys to remain empty, so that is why I need to keep iterating on the <code>shorter</code> array until all keys have a value. </p>

<p><strong>EDIT:</strong> I want to keep array longer intact, but without empty values, that means keep iterating on shorter until all keys have a value. </p>

<pre><code>longer  = [1, 2, 3, 4, 5, 6, 7]
shorter = ['a', 'b', 'c']

Hash[longer.zip(shorter)]
#=&gt; {1=&gt;"a", 2=&gt;"b", 3=&gt;"c", 4=&gt;nil, 5=&gt;nil, 6=&gt;nil, 7=&gt;nil}
</code></pre>

<p><strong>Expected Result</strong></p>

<pre><code>#=&gt; {1=&gt;"a", 2=&gt;"b", 3=&gt;"c", 4=&gt;"a", 5=&gt;"b", 6=&gt;"c", 7=&gt;"a"}
</code></pre>