Fix syntax so tests can work on older Ruby versions