Shin-ichiro Hara's library, updated for Ruby 1.9 & packaged as a gem.