Update rubocop to 0.27.1

- Updates rubocop to 0.27.1 from 0.24.1.
- Fixes new rubocop offenses.