Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Remove redundant constructs #236

Merged
merged 1 commit into from Jul 25, 2012
Jump to file or symbol
Failed to load files and symbols.
+2 −3
Split
@@ -59,7 +59,7 @@ def transaction
rollback!
raise
ensure
- self.rollback_requests = nil if Thread.main == Thread.current
+ self.rollback_requests = nil
end
end
@@ -108,8 +108,7 @@ def find_and_execute_task(path, hooks={})
def rollback!
return if Thread.current[:rollback_requests].nil?
- Thread.current[:rolled_back] = true
-
+
# throw the task back on the stack so that roles are properly
# interpreted in the scope of the task in question.
rollback_requests.reverse.each do |frame|