ruby convert string to int without using 'to_i' : <p>So I'm defining a anonymous class to test a method like so:</p>

<pre><code>  let!(:s_integer) do
    class &lt;&lt; self
      def change(value)
        self(value)
      end
    end

    def change(value)
      self.class.change(value)
    end
  end
</code></pre>

<p>The problem is that where <code>Integer('9')</code> works, <code>self('9')</code> doesn't, but I can't use <code>to_i</code> so how do I work around this problem?</p>
