ParentFull threadafiedler·Ruby's standard library does this. Here's the code: https://github.com/ruby/ruby/blob/trunk/lib/set.rbView on HN