Revert "special case exact and substring matches"

This reverts commit d1b717c87a719bcf6e7d1c72a225b0c368b85534.
It broke on 1.9.x Ruby versions.