backport to ruby 1.8.7
Merge pull request #1 from livingsocial/187backport

backport to ruby 1.8.7