plexus 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plexus/arc.rb +1 -1
- data/lib/plexus/edge.rb +1 -1
- data/lib/plexus/version.rb +1 -1
- metadata +1 -1
data/lib/plexus/arc.rb
CHANGED
@@ -13,7 +13,7 @@ module Plexus
|
|
13
13
|
|
14
14
|
# Ignore labels for equality.
|
15
15
|
def eql?(other)
|
16
|
-
same_class =
|
16
|
+
same_class = self.class.ancestors.include?(other.class) || other.class.ancestors.include?(self.class)
|
17
17
|
same_class && target == other.target && source == other.source
|
18
18
|
end
|
19
19
|
alias == eql?
|
data/lib/plexus/edge.rb
CHANGED
@@ -6,7 +6,7 @@ module Plexus
|
|
6
6
|
# Edge equality allows for the swapping of source and target.
|
7
7
|
#
|
8
8
|
def eql?(other)
|
9
|
-
same_class =
|
9
|
+
same_class = self.class.ancestors.include?(other.class) || other.class.ancestors.include?(self.class)
|
10
10
|
super || (same_class && target == other.source && source == other.target)
|
11
11
|
end
|
12
12
|
alias == eql?
|
data/lib/plexus/version.rb
CHANGED