Permalink
Browse files

Use ensure

  • Loading branch information...
1 parent 6e57c68 commit ce0c97d4e77506bb777def96571a877fb9946099 @sferik committed Nov 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/twitter/core_ext/enumerable.rb
@@ -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.