Adapt code for upcomming rubocop

This prepares the code for the next rubocop version.