Sample repo for this Rubocop bug (now fixed): rubocop/rubocop#3037 (comment)
Fixed in https://github.com/bbatsov/rubocop/commit/8e01f155f84217eed0011239c0445d0607497ca9
The fixed branch uses the fixed version of Rubocop. You might need to run Rubocop with bundle exec
to use the newer version.