lib/prosopite.rb in prosopite-1.0.9 vs lib/prosopite.rb in prosopite-1.1.1
- old
+ new
@@ -32,12 +32,13 @@
tc[:prosopite_scan] = true
if block_given?
begin
- yield
+ block_result = yield
finish
+ block_result
ensure
tc[:prosopite_scan] = false
end
end
end
@@ -46,9 +47,17 @@
Thread.current
end
def pause
tc[:prosopite_scan] = false
+
+ if block_given?
+ begin
+ yield
+ ensure
+ tc[:prosopite_scan] = true
+ end
+ end
end
def resume
scan
end