threadlock 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/threadlock.rb +2 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 690971678359590f806de448665ace8c671cbdf4
4
- data.tar.gz: 976a934e2288dd3dbcdcba57eef942914b5c9de7
3
+ metadata.gz: 22ab60659c189ff0003cbec95e7db3237fa68d1b
4
+ data.tar.gz: 26819e3a35e1df3250b9fec0d1a366638dc0794a
5
5
  SHA512:
6
- metadata.gz: ef1086f8452e7d52aed6c386ff39f04d9cc87c2aaa0aceca48f83c3fa8337a1bff2e407717c7d7169060a8f91a5f14f6f137ef09c683bd8fac0b2553798c7fcb
7
- data.tar.gz: c2f5a307cecf7b83bf00a616527de51833ba22c417d2b4f113a7adff227adbed58d2259e6313aa99b7136a39e1129b582f2908b27f6f5c534e7a9e7ce1f2109e
6
+ metadata.gz: d9c114c9c29918383d994d1898a1f8c03bd3a148a95497eb988ce24c4e2ee0a3de75a4e4b5f4e295f2e3719fa02c7b54d8b3d045444200316dcecc469e20286e
7
+ data.tar.gz: 053c3e0b3972a3d3553bd669eb3002afe2458157b2175f90fdd01ee7ed2678d1e91022244b79544cf3350d6559248ef5a1dd4cbd26ba2e85fe3841e6cddc668f
data/lib/threadlock.rb CHANGED
@@ -18,10 +18,10 @@ def threadlock(*funcs, lock: :@___threadlock___)
18
18
  class_eval\
19
19
  ("
20
20
  alias :#{f2} :#{f}
21
- def #{f}(*args)
21
+ def #{f}(*args, &block)
22
22
  #{lock.to_s} ||= Monitor.new
23
23
  #{lock.to_s}.synchronize do
24
- #{f2}(*args)
24
+ #{f2}(*args, &block)
25
25
  end
26
26
  end
27
27
  ")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threadlock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe McIlvain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-02 00:00:00.000000000 Z
11
+ date: 2013-07-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: "Use the threadlock function in your class definition to automatically
14
14
  run instance methods inside of an instance-wide re-entrant lock (Monitor). All