HomePhorge

(#9671) Return nodes from internal RbTreeMap recursion
5f7f467e96fbUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#9671) Return nodes from internal RbTreeMap recursion

These methods were previously returning either keys or values, depending
on the particular method they were helping to implement. This was
inflexible and could result in multiple traversals to get information
which should be available from one. Now they return nodes, so their
callers can ask for the information they care about.

Concretely, this fixes a bug where #has_key? called with a key whose
value was nil would return false. This was because #has_key? simply
called #get, and could not distinguish whether it returned nil because
it was the value, or because there was no value.

Paired-With: Josh Cooper <josh@puppetlabs.com>

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU1dc9c72bf739: (#9671) Stop tracking size and height of nodes in RbTreeMap
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPU5f7f467e96fb: (#9671) Return nodes from internal RbTreeMap recursion (authored by Nick Lewis <nick@puppetlabs.com>).Nov 11 2011, 11:26 PM