Ruby: Don't a add return in ensure

Posted About 11 years ago by Dragos Miron.

This method won't throw an error: def a_method raise ensure return :something end it will in fact return...

Profiling Ruby with ruby-prof

Posted Over 11 years ago by Nasir Jamal.

require 'ruby-prof' # you don't need this if you have ruby-prof in your Gemfile You can set one...

Method return value should always be of same type

Posted Over 11 years ago by Nasir Jamal.

One of the main source of bugs and complexity in the code is when a functional method (that we expect...