This is a fix of an older Ruby module created by Nicholas Rahn in 2006.