Rubocop: Style/Proc

- Use proc instead of Proc.new
...and use lambda instead of proc
This commit is contained in:
Pat Hawks 2016-01-03 16:18:26 -08:00
parent af5d51289f
commit 7ca4f7cd62
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ module Jekyll
# Get configuration from <source>/_config.yml or <source>/<config_file>
config_files = override.delete('config')
if config_files.to_s.empty?
default = %w(yml yaml).find(Proc.new { 'yml' }) do |ext|
default = %w(yml yaml).find(-> { 'yml' }) do |ext|
File.exist?(Jekyll.sanitized_path(source(override), "_config.#{ext}"))
end
config_files = Jekyll.sanitized_path(source(override), "_config.#{default}")