title: Provide value for self when using Proc#call
body: <p>When using Proc#call to call a lambda function in Ruby, <code>self</code> always ends up with the value that it had when the function was defined, rather than the value it has when the function is called, for example:</p>
  
  <pre><code>$p = lambda { self }
  
  class Dummy
    def test
      $p.call
    end
  end
  
  d = Dummy.new
  
  &gt; d.test
  =&gt; main
  </code></pre>
  
  <p>Calling <code>test</code> returns <code>main</code>, when what I intended it to return is <code>#&lt;Dummy:0xf794&gt;</code> - an instance of <code>Dummy</code>, which was the value of <code>self</code> at the point in the code where I called <code>$p</code>.</p>
  
  <p>In Javascript, I would just pass the object that I want to be the "callee" as the first argument to <code>call</code>. Is there any such functionality in Ruby, allowing me to set an arbitrary object, or at least the current value of <code>self</code>, as the new value for <code>self</code> when  I call a <code>Proc</code>?</p>