A
Aldric Giacomoni
I don't know enough to really test this but I came across a funny
behavior - example code requires Net::LDAP.
#
# Prepare and start loop iterating through data in a Windows AD.
# 'entry' is the name of iterator.
#Apparently, the simple fact of checking this keeps Ruby from raising
#a NoMethodError when those entries don't exist
puts "" if entry[:lastlogon].nil?
puts "" if entry[peratingsystemservicepack].nil?
puts "" if entry[peratingsystem].nil?
By typing those lines, I get no related output, but I also avoid
crashes. It's pretty neat but it feels a little hackish. Is this
normal/expected behavior?
--Aldric
behavior - example code requires Net::LDAP.
#
# Prepare and start loop iterating through data in a Windows AD.
# 'entry' is the name of iterator.
#Apparently, the simple fact of checking this keeps Ruby from raising
#a NoMethodError when those entries don't exist
puts "" if entry[:lastlogon].nil?
puts "" if entry[peratingsystemservicepack].nil?
puts "" if entry[peratingsystem].nil?
By typing those lines, I get no related output, but I also avoid
crashes. It's pretty neat but it feels a little hackish. Is this
normal/expected behavior?
--Aldric