title: How to concatenate strings with condition each loop in ruby
body: <p>I'm trying to concatenate 2 consecutive strings if any string length is less than 4 characters, but I'm not successful.</p>
  
  <p>The code I have so far is:</p>
  
  <pre><code>strings = ['abnhs', 'iuu', 'poioyw', 'tyr', 'mmkaud']
  strings.each do |w|
    if w.length &lt; 4
      temp = w
      next
    end    
    w = temp + w 
    puts w
  end
  </code></pre>
  
  <p>Expected output is:</p>
  
  <pre><code>abnhs
  iuupoioyw
  tyrmmkaud
  </code></pre>
  
  <p>Thanks in advance for any help</p>