loading...

About Ruby Hash#compare_by_identity and Hash#compare_by_identity?

burdettelamar profile image Burdette Lamar ・1 min read

Get more information and more examples at my AboutRuby project:

Here's the write-up over at the Ruby project:

My main page is here.

TL;DR

I've been working on enhancements to the documentation for the Ruby project. Getting these enhancements posted to the Ruby project has been very slow. They're not actually meeting resistance; I know because my many PRs for enhancing class ENV were accepted (though not rapidly). It's just that everyone is busy.

Anyhow, I'm stashing all this stuff on in my own project, called AboutRuby. The piecemeal migration from there to the Ruby project is not going to be completed in my lifetime (I'm 77 years old).

So: I'm going to blow my own horn here on DEV, to encourage you to use the enhanced documentation.

Posted on by:

burdettelamar profile

Burdette Lamar

@burdettelamar

Started out teaching English at Embry-Riddle. Graded 10,000 essays. Lesson learned. Became a mathematics teacher. Discovered computing. Never looked back.

Discussion

markdown guide
 

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! :)

 

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