title: What does "nil#" mean in profiler results?
body: <p>Here is very simplified part of code:</p>
  
  <pre><code>srand 0
  
  WIDTH, HEIGHT = 10, 10
  array = Array.new(HEIGHT){ [0]*WIDTH }
  
  require "profile"
  10000.times do
      y, x = rand(HEIGHT), rand(WIDTH)
      g = array[y][x] + [-1,+1].sample
      array[y][x] = g unless [[y-1,x],[y+1,x],[y,x-1],[y,x+1]].any?{ |y, x|
          y&gt;=0 &amp;&amp; y&lt;HEIGHT &amp;&amp; x&gt;=0 &amp;&amp; x&lt;WIDTH &amp;&amp; 1 &lt; (array[y][x] - g).abs
      }
  end
  </code></pre>
  
  <p>We see (<code>ruby 2.0.0p451 (2014-02-24) [i386-mingw32]</code>):</p>
  
  <pre><code>  %   cumulative   self              self     total
   time   seconds   seconds    calls  ms/call  ms/call  name
   39.33     0.86      0.86    47471     0.02     0.05  nil#
  </code></pre>
  
  <p>If we totally remove the <code>unless</code> thing:</p>
  
  <pre><code> 53.48     0.48      0.48    10000     0.05     0.09  nil#
  </code></pre>
  
  <p>Looks like we get this <code>nil#</code> operation:</p>
  
  <ol>
  <li>on every <strong>comparision</strong> or <strong>boolean operation</strong>?</li>
  <li>on every <strong>Array object creation</strong> or <strong>block envocation</strong>?</li>
  </ol>
  
  <p>Would be nice to get a deep answer.</p>