C
Charles Comstock
Why does this happen?
class A
end
A == A #1 => true
A === A #2 => false
a = A.new
a === A #3 => false
a == A #4 => false
A === a #5 => true
A == a #6 => false
1 makes sense, A is an A so therefor it should be true
3 and 4 make sense since instance of A is not A and does not match A
5 and 6 make sense in that A matches a, but A is not an a.
But 2 doesn't make any sense to me, why doesn't an A match another A?
Is this just something that slipped through or is there a specific
reason for this?
Charles Comstock
class A
end
A == A #1 => true
A === A #2 => false
a = A.new
a === A #3 => false
a == A #4 => false
A === a #5 => true
A == a #6 => false
1 makes sense, A is an A so therefor it should be true
3 and 4 make sense since instance of A is not A and does not match A
5 and 6 make sense in that A matches a, but A is not an a.
But 2 doesn't make any sense to me, why doesn't an A match another A?
Is this just something that slipped through or is there a specific
reason for this?
Charles Comstock