RB-Trees supported Ruby2 - originally by OZAWA Takuma