title: Variable assignment using eval
body: <p>Assigning a instance variable using eval works fine whereas the other doesn't.  Trying to understand whats happening here. Any help is appreciated.</p>
  
  <pre><code>&gt;&gt; var = "a value"
  =&gt; "a value"
  
  &gt;&gt; @v
  =&gt; nil
  
  &gt;&gt; eval "@v = var"
  =&gt; "a value"
  
  &gt;&gt; @v
  =&gt; "a value"
  
  &gt;&gt; eval "var_new = var"
  =&gt; "a value"
  
  &gt;&gt; var_new
  NameError: undefined local variable or method `var_new' for main:Object
          from (irb):7
          from C:/Ruby193/bin/irb:12:in `&lt;main&gt;'
  </code></pre>