title: Why does string interpolation work in Ruby when there are no curly braces?
body: <p>The proper way to use string interpolation in Ruby is as follows:</p>
  
  <pre><code>name = "Ned Stark"
  puts "Hello there, #{name}" #=&gt; "Hello there, Ned Stark"
  </code></pre>
  
  <p>That is the way I intend to always use it. </p>
  
  <p>However, I've noticed something <strong>odd</strong> in Ruby's string interpolation. I've noticed that string interpolation works in Ruby without the curly braces in regards to instance variables. For example:</p>
  
  <pre><code>@name = "Ned Stark"
  puts "Hello there, #@name" #=&gt; "Hello there, Ned Stark"
  </code></pre>
  
  <p>And that trying the same thing as a non-instance variable does not work.</p>
  
  <pre><code>name = "Ned Stark"
  puts "Hello, there, #name" #=&gt; "Hello there, #name"
  </code></pre>
  
  <p>I've tried this with success in both 1.9.2 and 1.8.7. </p>
  
  <p>Why does this work? What is the interpreter doing here?</p>