From 1f8157022a4a401d1a508c7896369815f7a9e682 Mon Sep 17 00:00:00 2001 From: Nicholas Burlett Date: Wed, 25 Mar 2015 08:51:58 -0700 Subject: [PATCH] Clean up destination modified check Clean up the destination modified check in `source_modified_or_dest_missing?` to be easier to read. Note that it can now return `nil` instead of `false` for an unmodified `source_path` and a `nil` `dest_path`, but in a discussion on 706007ead9e97afbd0603cb8e4519b64dd325178 we decided that was okay. --- lib/jekyll/regenerator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/regenerator.rb b/lib/jekyll/regenerator.rb index 7bff5327..37107350 100644 --- a/lib/jekyll/regenerator.rb +++ b/lib/jekyll/regenerator.rb @@ -76,7 +76,7 @@ module Jekyll # # returns a boolean def source_modified_or_dest_missing?(source_path, dest_path) - modified?(source_path) || ((dest_path and !File.exist?(dest_path)) or false) + modified?(source_path) || (dest_path and !File.exist?(dest_path)) end # Checks if a path's (or one of its dependencies)