lib/nanoc/base/views/item_rep_view.rb in nanoc-4.2.1 vs lib/nanoc/base/views/item_rep_view.rb in nanoc-4.2.2
- old
+ new
@@ -13,10 +13,16 @@
# @see Object#==
def ==(other)
other.respond_to?(:item) && other.respond_to?(:name) && item == other.item && name == other.name
end
- alias eql? ==
+
+ # @see Object#eql?
+ def eql?(other)
+ other.is_a?(self.class) &&
+ item.eql?(other.item) &&
+ name.eql?(other.name)
+ end
# @see Object#hash
def hash
self.class.hash ^ item.identifier.hash ^ name.hash
end