Monday, June 2, 2008

Hashes Under The Hood

If you've ever worked with hashes before and wondered how they work behind the scenes, I've written a very straightforward Ruby implementation of a hashing class. The "lookup" method in particular is pretty easy to follow and should give a decent understanding of how hash retrieval works in general.

Simple Hashing Implementation

Edit: Looks like Ruby Garden is temporarily down. Hopefully it will be back up soon.

No comments: