title: How ensure works in ruby
body: <p>checkout this code and the output</p>
  
  <pre><code>def lab
    yield
    ensure
      puts 'in ensure block'
      true
  end
  
  puts lab { puts 'inside inline block'; false }
  
  output is
  #inside inline block
  #in ensure block
  #false
  </code></pre>
  
  <p>I was expecting that after the block is executed then ensure will be executed and since ensure returns true , the final output of calling the method would be 'true'.</p>