synchronizable 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/synchronizable.rb +1 -3
- data/lib/synchronizable/version.rb +1 -1
- metadata +1 -1
data/lib/synchronizable.rb
CHANGED
@@ -16,11 +16,9 @@ module Synchronizable
|
|
16
16
|
original_method = obj.method(m)
|
17
17
|
next if IGNORABLE_METHOD_OWNERS.include?(original_method.owner)
|
18
18
|
|
19
|
-
without_sync_method = "#{original_method.name}_without_sync"
|
20
|
-
obj.define_singleton_method(without_sync_method, original_method)
|
21
19
|
obj.define_singleton_method(m) do |*args, &block|
|
22
20
|
__lock.synchronize do
|
23
|
-
|
21
|
+
original_method.call(*args, &block)
|
24
22
|
end
|
25
23
|
end
|
26
24
|
end
|