fix rubocop warning 'RedundantReturn'