This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch travis-debug+ldap
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/travis-debug+ldap by this push:
new f69823c back out the collection/new method changes
f69823c is described below
commit f69823c848391a44aa1e01e86ab5d3945418ea19
Author: Sam Ruby <[email protected]>
AuthorDate: Sun Nov 22 22:17:38 2020 -0500
back out the collection/new method changes
---
lib/whimsy/asf/ldap.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index ca10493..382d4a6 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1,4 +1,4 @@
-#
+e
# Encapsulate access to LDAP, caching results for performance. For best
# performance in applications that access large number of objects, make use
# of the preload methods to pre-fetch multiple objects in a single LDAP
@@ -451,7 +451,7 @@ module ASF
# return the collection of instances of this class, as a hash. Note the
# values are weak references, so may have already been reclaimed.
def self.collection
- @collection ||= {}
+ @collection ||= Hash.new
end
# Find an instance of this class, given a name
@@ -469,7 +469,7 @@ module ASF
def self.new(name)
begin
object = collection[name]
- return object.reference if object&.weakref_alive?
+ return object.reference if object and object.weakref_alive?
rescue
end