Fixes #4826 - fix rubocop