lib/bootsnap/load_path_cache/cache.rb in bootsnap-0.2.10 vs lib/bootsnap/load_path_cache/cache.rb in bootsnap-0.2.11

- old
+ new

@@ -118,10 +118,11 @@ def push_paths_locked(*paths) @store.transaction do paths.map(&:to_s).each do |path| p = Path.new(path) + next if p.non_directory? entries, dirs = p.entries_and_dirs(@store) # push -> low precedence -> set only if unset dirs.each { |dir| @dirs[dir] ||= true } entries.each { |rel| @index[rel] ||= path } end @@ -130,9 +131,10 @@ def unshift_paths_locked(*paths) @store.transaction do paths.map(&:to_s).reverse.each do |path| p = Path.new(path) + next if p.non_directory? entries, dirs = p.entries_and_dirs(@store) # unshift -> high precedence -> unconditional set dirs.each { |dir| @dirs[dir] = true } entries.each { |rel| @index[rel] = path } end