Ported a pull request to the other languages

See: https://github.com/twitter/effectivescala/pull/48