lib/zache.rb in zache-0.5.0 vs lib/zache.rb in zache-0.5.1
- old
+ new
@@ -137,10 +137,16 @@
@hash[key][:value]
end
def synchronized
if @sync
- @monitor.mon_synchronize { yield }
+ @monitor.synchronize do
+ # I don't know why, but if you remove this line, the tests will
+ # break. It seems to me that there is a bug in Ruby. Let's try to
+ # fix it or find a workaround and remove this line.
+ sleep 0.00001
+ yield
+ end
else
yield
end
end