From 0a2e9b02d60ef3bf1ec1dc9d032d25aefc81987e Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 11 Nov 2015 05:23:29 +0100 Subject: rewrites bare loop as until --- activesupport/lib/active_support/file_evented_update_checker.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/file_evented_update_checker.rb b/activesupport/lib/active_support/file_evented_update_checker.rb index 51c8cf5690..d63c8e2438 100644 --- a/activesupport/lib/active_support/file_evented_update_checker.rb +++ b/activesupport/lib/active_support/file_evented_update_checker.rb @@ -107,9 +107,7 @@ module ActiveSupport lcsp = Pathname.new(paths[0]) paths[1..-1].each do |path| - loop do - break if lcsp.ascendant_of?(path) - + until lcsp.ascendant_of?(path) if lcsp.root? # If we get here a root directory is not an ascendant of path. # This may happen if there are paths in different drives on -- cgit v1.2.3