lib/yard/cli/yardoc.rb in yard-0.9.4 vs lib/yard/cli/yardoc.rb in yard-0.9.5

- old
+ new

@@ -244,11 +244,18 @@ checksums = nil if use_cache Registry.load checksums = Registry.checksums.dup end - YARD.parse(files, excluded) - Registry.save(use_cache) if save_yardoc + + if save_yardoc + Registry.lock_for_writing do + YARD.parse(files, excluded) + Registry.save(use_cache) + end + else + YARD.parse(files, excluded) + end if generate run_generate(checksums) copy_assets elsif list