fix rubocop warning 'Lambda'