Use #take instead of #take_while

This commit is contained in:
Parker Moore 2016-05-19 09:08:25 -07:00
parent 6355a07d4b
commit 4b1012537f
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ module Jekyll
def print_worst_offenders def print_worst_offenders
@io.puts @io.puts
@io.puts "Worst offenders:" @io.puts "Worst offenders:"
@timings.sort_by { |_f, t| -t }.take_while { |i| i < 10 }.each do |(f, t)| @timings.sort_by { |_f, t| -t }.take(10).each do |(f, t)|
@io.puts " #{t}s for #{f}" @io.puts " #{t}s for #{f}"
end end
@io.puts @io.puts