Inserting One New Element into Hashes of Varying Sizes - Pat Shaughnessy
07-Feb-2025 112
I've started working on a new edition of Ruby Under a Microscope that covers Ruby 3.x. I'm working on this in my spare time, so it will take a while. Leave a comment or drop me a line and I'll email you when it's finished.
RUM includes a series of “experiments:” simple code snippets that show evidence the book’s explanations are accurate. One of the first experiments I wrote back in 2013, Experiment 7-2 is a fun way to see exactly when Ruby increases the number of bins in a hash table. The experiments in RUM are a great way to see for yourself how Ruby works. They also keep me honest; in fact, I ran this code again recently using Ruby 3.4.1 and saw different results than what I expected!.
Inserting One New Element into Hashes of Varying Sizes - Pat Shaughnessy #ruby #rubydeveloper #rubyonrails #Inserting #Element #Hashes #Varying #Sizes #Shaughnessy https://rubyonrails.ba/link/inserting-one-new-element-into-hashes-of-varying-sizes-pat-shaughnessy