Tweak in edge.rb
authorNeil Smith <neil.github@njae.me.uk>
Mon, 26 Sep 2011 11:12:48 +0000 (12:12 +0100)
committerNeil Smith <neil.github@njae.me.uk>
Mon, 26 Sep 2011 11:12:48 +0000 (12:12 +0100)
lib/graph.njae/edge.rb

index 6581033d2a885bbe4fe8beddf1eddfb38879b50a..f38a32b21e693bbf645c25bdcca159579f97dceb 100644 (file)
@@ -31,7 +31,7 @@ module GraphNjae
     
     # Return the connection object that joins this Edge to the specified Vertex
     def connection_at(vertex)
-      self.connections.select {|c| c.end.equal?  vertex}.first
+      self.connections.find {|c| c.end.equal?  vertex}
     end
   end