Add a syntax test to help support multiple Rubies

This is no real gain on Travis, which runs the full test suite
against two Rubies. It does catch a few classes of error when
running the test suite locally.
Merge pull request #5020 from rolandwalker/syntax_test

WIP: Add a syntax test to help support multiple Rubies