timrogers/in_business — pull request #4 by jackfranklin (2014-03-06 00:30:13+00:00)
Title: use cover? over include?

`include?` checks every possible object in the range, whereas `cover?` checks the first and last, and if what is past is in between.

This means it's a bit quicker for doing comparisons like this when you can compare with some greater than or less than operations, rather than having to check every object in the potential range.

See https://gist.github.com/julian7/4055746 for some benchmarks (although benchmarks on their own are often worthless, granted).

Awesome gem btw - have it starred for a future side project of mine and noticed this so thought I'd send a PR :)