From 5ca3b471cd53eaa711f9f85f14eed12cb7852590 Mon Sep 17 00:00:00 2001 From: joshuay03 Date: Tue, 23 Jul 2024 05:46:50 +0000 Subject: [PATCH] deploy: 10e6ba3c4bf01966034469bfd1f0f9a3084e332c --- RedBlackTree.html | 50 +++++++++++++++++++++++++++++++++------- RedBlackTree/Node.html | 2 +- _index.html | 2 +- file.README.html | 2 +- index.html | 2 +- top-level-namespace.html | 2 +- 6 files changed, 47 insertions(+), 13 deletions(-) diff --git a/RedBlackTree.html b/RedBlackTree.html index 0e30c51..81a5c6f 100644 --- a/RedBlackTree.html +++ b/RedBlackTree.html @@ -510,6 +510,19 @@

self

+ + + +

Raises:

+ @@ -533,12 +546,16 @@

60 61 62 -63 +63 +64 +65
# File 'lib/red-black-tree.rb', line 50
 
 def << node
+  raise ArgumentError, "cannot add leaf node" if node.instance_of? LeafNode
+
   parent = @root
   direction = nil
 
@@ -665,6 +682,19 @@ 

self

+ + + +

Raises:

+
    + +
  • + + + (ArgumentError) + + +
@@ -675,10 +705,6 @@

 
 
-130
-131
-132
-133
 134
 135
 136
@@ -739,12 +765,20 @@ 

191 192 193 -194

+194 +195 +196 +197 +198 +199 +200

-
# File 'lib/red-black-tree.rb', line 130
+      
# File 'lib/red-black-tree.rb', line 134
 
 def delete! node
+  raise ArgumentError, "cannot delete leaf node" if node.instance_of? LeafNode
+
   if node.children_are_valid?
     successor = node.right
     successor = successor.left until successor.left.leaf?
@@ -936,7 +970,7 @@ 

diff --git a/RedBlackTree/Node.html b/RedBlackTree/Node.html index 8b709b5..a35ec9b 100644 --- a/RedBlackTree/Node.html +++ b/RedBlackTree/Node.html @@ -430,7 +430,7 @@

diff --git a/_index.html b/_index.html index c52dcd4..7523b9f 100644 --- a/_index.html +++ b/_index.html @@ -112,7 +112,7 @@

Namespace Listing A-Z

diff --git a/file.README.html b/file.README.html index 23ce037..4536708 100644 --- a/file.README.html +++ b/file.README.html @@ -102,7 +102,7 @@

Code of Conduct

diff --git a/index.html b/index.html index 4cf060b..6d0f040 100644 --- a/index.html +++ b/index.html @@ -102,7 +102,7 @@

Code of Conduct

diff --git a/top-level-namespace.html b/top-level-namespace.html index aebf605..ad1c36b 100644 --- a/top-level-namespace.html +++ b/top-level-namespace.html @@ -100,7 +100,7 @@

Defined Under Namespace