nahi/avl_tree — pull request #9 by bkutil (2014-11-11 18:24:32+00:00)
Title: Fix raise on check_height for empty RB tree

An empty RB tree has a single EmptyNode as its root. As EmptyNode returns nil when calling right or left and thus, check_height on empty tree fails.

This patch modifies check_height so it returns 0 height even if children are nil and adds a test for this case.