summaryrefslogtreecommitdiffstats
path: root/state.rb
diff options
context:
space:
mode:
Diffstat (limited to 'state.rb')
-rw-r--r--state.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/state.rb b/state.rb
index e971843..a15f6b8 100644
--- a/state.rb
+++ b/state.rb
@@ -16,6 +16,19 @@ unless Array.instance_methods.include? "product"
end
end
+class Array
+ # Confirm that this array has no duplicate elements
+ def is_uniq?
+ self == self.uniq
+ end
+end
+
+class Symbol
+ def <=>(other)
+ self.to_s <=> other.to_s
+ end
+end
+
module UpState
# Occurs when the state machine becomes inconsistent