Skip to content

Conversation

HertzDevil
Copy link
Contributor

This refactor separates the number normalization part from the hashing part, so that the former can be easily unit-tested.

The implementations for the Big* types are evidently incomplete, but actually none of these are currently used; BigInt, BigFloat, BigRational, and BigDecimal delegate to to_i64!, to_f64, to_f64, and to_s respectively for their #hash. They will be addressed later.

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@straight-shoota straight-shoota added this to the 1.12.0 milestone Feb 19, 2024
@straight-shoota straight-shoota merged commit 72aea71 into crystal-lang:master Feb 20, 2024
@HertzDevil HertzDevil deleted the refactor/hasher-reduce_num branch February 20, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants