title: send method in Ruby
body: <p>I just read about what <code>send</code> does in Ruby and I'm still confused when looking at this code (it's from a quiz but its past due date anyways)</p>
  
  <pre><code>x = [1,2,3]
  x.send :[]=,0,2
  x[0] + x.[](1) + x.send(:[],2)
  </code></pre>
  
  <p>I understand that the first line assigns an array to x
  then I don't understand what <code>:[] = ,0,2</code> does at all and i dont understand why send is needed there
  I dont get what <code>x.[](1)</code> does and x.send(:[],2) do on the last line  </p>
  
  <p>I'm really confused and I just cant find this information online. </p>
  
  <p>I found the what <a href="https://stackoverflow.com/questions/3337285/what-does-send-do-in-ruby">send does</a> but I'm still a little bit confused and a lot of bit confused about this code as a whole.</p>