title: Parallel Assignment operator in Ruby
body: <p>I was going through an example from the Programming in Ruby book:</p>
  
  <pre><code>def fib_up_to(max)
    i1, i2 = 1, 1 # parallel assignment (i1 = 1 and i2 = 1)
    while i1 &lt;= max
      yield i1
      i1, i2 = i2, i1+i2
    end
  end
  fib_up_to(100) {|f| print f, " " }
  </code></pre>
  
  <p>This simply prints the Fibonacci numbers up to 100. That's fine. When I replace the parallel assignment with:</p>
  
  <pre><code>i1 = i2
  i2 = i1+i2
  </code></pre>
  
  <p>I am not getting the desired output. </p>
  
  <p>Is it advisable to use parallel assignments? I come from a Java background and it feels really weird to see this type of assignment.</p>
  
  <p>One more question is: Is parallel assignment an operator?</p>