note
Thilosophy
<i>Rewind it before using each</i>.
<p>I did that at first, but then I changed it to rewind <i>after</i> use.
<p>Because if you rewind it only before, and then leave the iterator "open", your own piece of code is fine, but it will greatly confuse the next person who happens to call <code>keys</code>, <code>values</code> or <code>each</code>. So I decided that cleaning up after myself is the better way here.
<p><b>Update</b> As pointed out by [ysth], it would only greatly confuse any other users of <code>each</code>, and not affect <code>keys</code> or <code>values</code>.
475106
475147