dup is an interesting method. While looking into a strange bug currently on Ruby's issues tracker caused by the interplay of modules and dup, I decided to take a dive into the MRI source to find out exactly what happens behind the scenes when dup is called. This led to the discovery of quite an interesting bug, which I will detail below. Here's the code to Kernel#dup - with the exception of Proc a
{{#tags}}- {{label}}
{{/tags}}