futex 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/futex.gemspec +1 -1
  3. data/lib/futex.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 304cc67b805690f790a453273a62956b240d871b35aceb85fd3914b0a844f419
4
- data.tar.gz: 777127ff698b47ac49d6477ad753cbad9479c62cf57951eeb05dc4fa83da3ad9
3
+ metadata.gz: c0e4abff4199f0689d0b4cd5690cff965c73ecd8d677f1462990988b2d812f95
4
+ data.tar.gz: 796906e21996515e1dda5a4e5d3e61de99214626b3940c950fff6443121a5e1f
5
5
  SHA512:
6
- metadata.gz: 96cc04db67df9cc3560639369e0b0715cec5c61483e107235c27ebd5efd33063812675d0d96323fc9928b6d7854d5bc810b5bf05a6e7b0bb68b0857fb209123b
7
- data.tar.gz: 7ac2732a0196fceb094b9381dc7dad8e18dcbae6dc8ba55878c1fa4e2a465c0423c999bcb75f5b4df5295425b9c519698b1a719513d8c46471b01d376418de94
6
+ metadata.gz: bc1ea4e547ccda842801c62a758bd2b6a2705e88ce30c9a73455db238766a738c8203b8d674ab352ea12c7c700490c7178e3d69085d7bff3265a7528812c7e7c
7
+ data.tar.gz: 73c7b53cab1bc82e526cd01f9c5435de634f92fb2628367eca44bec1a82e47204ce464de48b6c39dff3897c467e360f411f93e14a550650abda7ec5950f38bcd
data/futex.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.rubygems_version = '2.3.3'
32
32
  s.required_ruby_version = '>=2.3'
33
33
  s.name = 'futex'
34
- s.version = '0.8.4'
34
+ s.version = '0.8.5'
35
35
  s.license = 'MIT'
36
36
  s.summary = 'File-based mutex'
37
37
  s.description = 'Ruby Gem for file-based locking'
data/lib/futex.rb CHANGED
@@ -177,7 +177,7 @@ access to #{@path}, #{age(start)} already: #{IO.read(@lock)} \
177
177
  synchronized do |counts|
178
178
  file&.close
179
179
  refs = deserialize(IO.read(counts.path))
180
- refs[path] -= 1
180
+ refs[path] = (refs[path] || 1) - 1
181
181
  if refs[path].zero?
182
182
  FileUtils.rm(path, force: true)
183
183
  refs.delete(path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko