I keep hearing warnings from intelligent people that you shouldn’t trust conclusions drawn from rat studies because they are preliminary and usually sensationalized.
I would challenge the assumption that rats have evolved notably-superior stomachs or immune systems or whatever.
Just because the species can survive scavenging human trash doesn't mean individuals aren't running risks and getting hurt. Just because I always see some rats around the dumpster doesn't mean everything's going well for them.
I would challenge your challenge mainly because I don't think that rats have superior immune systems because of eating whatever, but rather they eat whatever due to their superior immune system.
"We assume that many wild animals are resource limited, and so expect that immune responses may be submaximal. However, in truth, high levels of immune responsiveness are, in general, seen in wild rodents."
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5694458/
Defining a new class is probably the most Ruby way to do it. There are two implementations that define a new class: rb_heap[1] and algorithms[2]. However, algorithms[2] use a Fibonacci heap, which should technically have better time complexity but is slower in practice, and the library pulls in a lot of unnecessary stuff. rb_heap is good, although I think using a symbol to specify if it's a max/min heap is a little strange.
There is something satisfying about using an array like Python. It's very straightforward and doesn't require you to convert back and forth between a queue and a array.
That's an interesting idea to use Queue. I do need random access to implement the binary queue, so I'm not sure if Queue would work.