title: Access variable with name from string
body: <pre><code> @result.instance_variable_get("#{@most}_max_count".to_sym)
  </code></pre>
  
  <p><code>@most</code> is a single-digit string, for instance <code>i</code>. This code bit gives the error</p>
  
  <pre><code>`i_max_count' is not allowed as an instance variable name
  </code></pre>
  
  <p>(What I am trying to access is <code>@result.i_max_count</code>)</p>
  
  <p>edit:
  What I want to do is to set the value of @result.i_max_count to something.</p>
  
  <p>Class for @result is pretty much empty:</p>
  
  <pre><code>class Result &lt; ActiveRecord::Base
      attr_accessor :least, :most
  end
  </code></pre>