Arggh, every single time someone posts an incredible cool small piece of code that solves a difficult problem, comments like this appear.
This whole HN attitude of pristine code is killing me. This is a piece of code in a GIST and solves the problem in three lines, it is clearly not intended for production use in a large code base.
Please stop searching for something wrong and enjoy what is presented in all of its glory.