DEV Community

About Ruby Hash#compare_by_identity and Hash#compare_by_identity?

Burdette Lamar on April 21, 2020

Get more information and more examples at my AboutRuby project: AboutRuby project Here's the write-up over at the Ruby project: Ruby project ...
Collapse
 
isalevine profile image
Isa Levine • Edited

As always, great writeup--compare_by_identity is totally new to me and looks really useful!

Just cuz I'm nitpicky--small typo in the 2nd part of compare_by_identity:

After calling compare_by_identity, the keys are considered different, the therefore do not overwrite:

Thanks for sharing this! :)

Collapse
 
burdettelamar profile image
Burdette Lamar

Thanks, Isa! Fixed. I like nitpicky, so if you see anything else, squawk. Or open a PR if you like.