diff --git a/lib/twitter/core_ext/enumerable.rb b/lib/twitter/core_ext/enumerable.rb index 2aa6c9a31..84ffc0ca9 100644 --- a/lib/twitter/core_ext/enumerable.rb +++ b/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