summaryrefslogtreecommitdiffstats
path: root/state.rb
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-10-03 14:10:06 -0400
committerCasey Dahlin <cdahlin@redhat.com>2008-10-03 14:10:06 -0400
commitf387145da2a8bde2911b977a8526f1461755a435 (patch)
tree3ca211938dccfc784c2193cdf1015f78024e8743 /state.rb
parent32d1bd9b41d59de0051a318dae433228dfcbad44 (diff)
downloadupstate-f387145da2a8bde2911b977a8526f1461755a435.tar.gz
upstate-f387145da2a8bde2911b977a8526f1461755a435.tar.xz
upstate-f387145da2a8bde2911b977a8526f1461755a435.zip
Fix hash function for State
State hash function now will match for states that should be equivalent
Diffstat (limited to 'state.rb')
-rw-r--r--state.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/state.rb b/state.rb
index aab4051..fc29cce 100644
--- a/state.rb
+++ b/state.rb
@@ -123,7 +123,7 @@ class State
# Our ID is a function of our class and deps
def hash
- (self.class.hash ** 2 + @deps.hash) % 0x4000000000000000
+ @deps.inject(self.class.hash){ |x,y| (x ** 2 + y) % 0x4000000000000000 }
end
# A state is rooted in a set of states if any state in the set which it _may_