Skip to content

Commit

Permalink
Use ensure
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Nov 28, 2012
1 parent 6e57c68 commit ce0c97d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/twitter/core_ext/enumerable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def threaded_map
def abort_on_exception
initial_abort_on_exception = Thread.abort_on_exception
Thread.abort_on_exception ||= true
value = yield
yield
ensure
Thread.abort_on_exception = initial_abort_on_exception
value
end

end

0 comments on commit ce0c97d

Please sign in to comment.