[ruby/prism] Better hashing between positive/negative integers
https://github.com/ruby/prism/commit/68ddf08634
This commit is contained in:
parent
950c60623b
commit
cb784082bc
@ -61,6 +61,10 @@ node_hash(const pm_parser_t *parser, const pm_node_t *node) {
|
|||||||
hash ^= murmur_hash((const uint8_t *) value, sizeof(uint32_t));
|
hash ^= murmur_hash((const uint8_t *) value, sizeof(uint32_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (integer->negative) {
|
||||||
|
hash ^= murmur_scramble((uint32_t) 1);
|
||||||
|
}
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
case PM_SOURCE_LINE_NODE: {
|
case PM_SOURCE_LINE_NODE: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user