title: Why doesn't this work if in Ruby everything is an Object?
body: <p>Considering that in the Ruby programming language everything is said to be an Object, I safely assumed that passing arguments to methods are done <em>by reference</em>. However this little example below puzzles me:</p>
  
  <pre><code>$string = "String"
  
  def changer(s)
    s = 1
  end
  
  changer($string)
  
  puts $string.class
  String
   =&gt; nil
  </code></pre>
  
  <p>As you can see the original Object wasn't modified, I wish to know <strong>why</strong>, and also, how could I accomplish the desired behavior ie. <strong>Getting the method to actually change the object referenced by its argument.</strong></p>