diff --git a/lib/oga/lru.rb b/lib/oga/lru.rb index a3d210a..be330e3 100644 --- a/lib/oga/lru.rb +++ b/lib/oga/lru.rb @@ -137,8 +137,10 @@ module Oga if @owner != Thread.current @mutex.synchronize do @owner = Thread.current + retval = yield + @owner = nil - yield + retval end else yield