summaryrefslogtreecommitdiffstats
path: root/state.rb
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-10-03 14:32:22 -0400
committerCasey Dahlin <cdahlin@redhat.com>2008-10-03 15:33:29 -0400
commit1ac10c28882e2a10c9cfb90031c7aa02107d2024 (patch)
tree5d53de7b475dd5162a9d630884c8da31123046f2 /state.rb
parent42f1039dfd7c83ba811fca91f7adc41117ffbdda (diff)
downloadupstate-1ac10c28882e2a10c9cfb90031c7aa02107d2024.tar.gz
upstate-1ac10c28882e2a10c9cfb90031c7aa02107d2024.tar.xz
upstate-1ac10c28882e2a10c9cfb90031c7aa02107d2024.zip
Fix use of legacy @params var in State
Make sure state isn't using @params anywhere. Also a minor format fix in the params method
Diffstat (limited to 'state.rb')
-rw-r--r--state.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/state.rb b/state.rb
index e3777ae..011567b 100644
--- a/state.rb
+++ b/state.rb
@@ -94,14 +94,14 @@ class State
def drop
return unless @active
break_holds if @holds.size > 0
- self.class.falling_edge.call(@params)
+ self.class.falling_edge.call(params)
becomes_defunct
end
# Parameters to this state
def params
@deps.map{ |x| x.params }.inject{ |x,y| x.merge y }.merge \
- @holds.map{ |x| x.params }.inject{ |x,y| x.merge y}
+ @holds.map{ |x| x.params }.inject{ |x,y| x.merge y }
end
# Set this state to untrue without running any falling edge code
@@ -202,7 +202,7 @@ private
def rise
return if @active
self.class.depends.each{ |x| x.hold(self) }
- self.class.rising_edge.call(@params)
+ self.class.rising_edge.call(params)
@active = true
State.depsolve_all
end