title: Ruby map method with instance_variables
body: <p>Say I have a class SomeClass with instance variables a and b.</p>
  
  <pre><code>def SomeClass
    def initialize a, b
      @a = a
      @b = b
    end
  end
  </code></pre>
  
  <p>When I type into pry the following lines</p>
  
  <pre><code>someclass = SomeClass.new "one", "two"
  someclass.instance_variables
  </code></pre>
  
  <p>As expected it prints an array with symbols </p>
  
  <pre><code>[:@a, :@b]
  </code></pre>
  
  <p>now, when I use </p>
  
  <pre><code>a.instance_variables.map do |var|
    puts var
  end
  </code></pre>
  
  <p>I expect it to print</p>
  
  <pre><code>:@a
  :@b
  </code></pre>
  
  <p>but what I am getting is </p>
  
  <pre><code>@a
  @b
  </code></pre>
  
  <p>Can someone please explain this behaviour ? </p>