Clean up ambiguous method warnings

When running with Ruby warnings, these usages of `#match` are ambiguous,
but can be made explicit with parens.
Merge pull request #1255 from stevenharman/clean-up-ambiguous-method-warnings

Clean up ambiguous method warnings