From 0c574b99753d290ed8c46a9be099cc8ac96f1a6d Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Wed, 2 Feb 2011 11:36:56 -0500 Subject: [PATCH] minor: alias Connection#reconnect to Connection#connect --- lib/mongo/connection.rb | 1 + lib/mongo/repl_set_connection.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/mongo/connection.rb b/lib/mongo/connection.rb index cfac20e..b8d83a0 100644 --- a/lib/mongo/connection.rb +++ b/lib/mongo/connection.rb @@ -469,6 +469,7 @@ module Mongo raise ConnectionFailure, "Failed to connect to a master node at #{@host_to_try[0]}:#{@host_to_try[1]}" end end + alias :reconnect :connect def connecting? @nodes_to_try.length > 0 diff --git a/lib/mongo/repl_set_connection.rb b/lib/mongo/repl_set_connection.rb index 1c45e9b..a247153 100644 --- a/lib/mongo/repl_set_connection.rb +++ b/lib/mongo/repl_set_connection.rb @@ -125,6 +125,7 @@ module Mongo end end end + alias :reconnect :connect def connecting? @nodes_to_try.length > 0