Skip to content

Commit

Permalink
so that Executor#execute is safe to run more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
godfat committed Nov 17, 2014
1 parent 12ea50e commit 686e86a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pork/imp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def passed?

private
def init desc=''
@desc, @tests, @stash, @before, @after = desc, [], {}, [], []
@desc, @tests, @stash = desc, [], {}
@super_executor = ancestors[1..-1].find{ |a| a <= Executor }
end

Expand Down Expand Up @@ -77,7 +77,7 @@ def run_protected desc

protected
def execute_with_parent io=$stdout, stat=Stat.new
@stat, @io = stat, io
@stat, @io, @before, @after = stat, io, [], []
@tests.each do |(type, arg, test)|
case type
when :before
Expand Down

0 comments on commit 686e86a

Please sign in to comment.