title: Hash ordering preserved between iterations if not modified?
body: <p>If I iterate over a hash once, then do so again without modifying the contents, are the keys guaranteed to appear in the same order?</p>
  
  <p>A quick test suggests as much:</p>
  
  <pre><code>&gt; h = {'a' =&gt; 1, 'b' =&gt; 2, 'c' =&gt; 3}
  &gt; 100_000.times.map { h.to_s == h.to_s }.all?
  =&gt; true
  </code></pre>
  
  <p>Another question, if the above is allowed, can I iterate through it changing only values, without adding any new keys, and have the ordering of the keys be unchanged?</p>
  
  <p>similar to this python question: <a href="https://stackoverflow.com/questions/1849324/do-python-dicts-preserve-iteration-order-if-they-are-not-modified">Do dicts preserve iteration order if they are not modified?</a></p>
  
  <p>Unlike the proposed duplicate I'm not interested in whether the elements have a fully specified order, only the restriction that two consecutive iterations without modification provide the same sequence.</p>