From 3f8f1ce641974780ef321ac402e5fe9df4e1dfaa Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Fri, 10 Oct 2008 16:44:12 -0400 Subject: Merge State#break_holds into State#becomes_defunct No point in having this little two-liner called in one place only. --- state.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'state.rb') diff --git a/state.rb b/state.rb index b82b81f..25cbb2c 100644 --- a/state.rb +++ b/state.rb @@ -179,7 +179,8 @@ class State def becomes_defunct(drop=false) return unless @status == :up @status = :dropping - break_holds if @holds.size > 0 + @holds.each{ |x| x.clear } + @holds = Set.new self.class.falling_edge.call(params) if drop @deps.each{ |x| x.state.release(self) } @hold_params = {} @@ -312,12 +313,6 @@ private @status = :up State.depsolve_all end - - # Inform other states that they may no longer depend on this one - def break_holds - @holds.each{ |x| x.clear } - @holds = Set.new - end end =begin rdoc -- cgit