Skip to content

Commit 67c2c35

Browse files
committed
add missing begin/ensure block
1 parent b4a1c94 commit 67c2c35

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/concurrent/synchronization/rbx_lockable_object.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ def synchronize(&block)
2020
else
2121
result = nil
2222
Rubinius.synchronize(self) do
23-
@__owner__ = Thread.current
24-
result = yield
25-
@__owner__ = nil
23+
begin
24+
@__owner__ = Thread.current
25+
result = yield
26+
ensure
27+
@__owner__ = nil
28+
end
2629
end
2730
result
2831
end

0 commit comments

Comments
 (0)