lib/erector/dependency.rb in erector-0.8.1 vs lib/erector/dependency.rb in erector-0.8.2
- old
+ new
@@ -15,7 +15,16 @@
def ==(other)
(self.type == other.type and
self.text == other.text and
self.options == other.options) ? true : false
end
+
+ def eql?(other)
+ self == other
+ end
+
+ def hash
+ # this is a fairly inefficient hash function but it does the trick for now
+ "#{type}#{text}#{options}".hash
+ end
end
end