not recursing into labels to avoid infinite loops
This commit is contained in:
parent
e02c6ed082
commit
98db88ac2f
@ -18,6 +18,22 @@ module Virtual
|
||||
def initialize nex = nil
|
||||
@next = nex
|
||||
end
|
||||
# simple thought: don't recurse for labels, just check their names
|
||||
def == other
|
||||
return false unless other.class == self.class
|
||||
attributes.each do |a|
|
||||
left = send(a)
|
||||
right = other.send(a)
|
||||
return false unless left.class == right.class
|
||||
if( left.is_a? Label)
|
||||
return false unless left.name == right.name
|
||||
else
|
||||
return false unless left == right
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
module Named
|
||||
|
Loading…
Reference in New Issue
Block a user