The fact that this works is just an implementation-specific detail. In theory, 'eq' will only compare object instance equality and not value. Thanks to /u/patrec from HN for pointing this out.