diff --git a/CHANGELOG.md b/CHANGELOG.md index 460d737f..f2e35a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Next Release +* Bring back `Spring::Watcher::Abstract#synchronize` method to fix compatibility with `spring-watcher-listen`. + ## 4.1.2 * Drop dependency on `mutex_m`. Avoid issues with loading the wrong version before bundler kicks in. diff --git a/lib/spring/watcher/abstract.rb b/lib/spring/watcher/abstract.rb index 0f7b4406..42fb3382 100644 --- a/lib/spring/watcher/abstract.rb +++ b/lib/spring/watcher/abstract.rb @@ -22,6 +22,11 @@ def initialize(root, latency) @on_debug = nil end + def synchronize(&block) + # Used by some gems. + @mutex.synchronize(&block) + end + def on_debug(&block) @on_debug = block end