Bugs: Browse | Submit New | Admin

[#16329] remove_edges! (and consortes) errors

Date:
2007-12-15 21:17
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
remove_edges! (and consortes) errors

Detailed description
GRATR::Graph#remove_edges! has an error, it should call remove_edge! internally; also, the nearby lines seem to carry
quite a couple typos:



--- /var/lib/gems/1.8/gems/gratr-0.4.3/lib/gratr/graph.rb       2007-09-30 00:00:07.000000000 +0200
+++ graph.rb    2007-12-15 22:16:25.000000000 +0100
@@ -103,13 +103,13 @@
     # See remove_vertices!
     def remove_vertices(*a) x=self.class.new(self); x.remove_vertices(*a); end
 
-    # Remove all vertices edges by the Enumerable a from the graph by
+    # Remove all edges by the Enumerable a from the graph by
     # calling remove_edge!
-    def remove_edges!(*a) a.each { |e| remove_edges! e }; end
-    alias remove_arc! remove_edges!
+    def remove_edges!(*a) a.each { |e| remove_edge! e }; end
+    alias remove_arcs! remove_edges!
 
     # See remove_edges
-    def remove_edges(*a) x=self.class.new(self); x.remove_edges(*a); end
+    def remove_edges(*a) x=self.class.new(self); x.remove_edges!(*a); end
     alias remove_arcs remove_edges
 
     # Execute given block for each vertex, provides for methods in Enumerable

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item