Permalink
Browse files

Fix warning: instance variable @ldap_controls not initialized

  • Loading branch information...
1 parent d6e6a97 commit 2835ecd82d2821d86a082366aa9b73f4d6df10a7 emiel committed Feb 27, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/net/ldap/pdu.rb
View
@@ -87,6 +87,7 @@ def initialize ber_object
# So it makes more sense just to grab the bottom five bits.
#@app_tag = ber_object[1].ber_identifier - 0x60
@app_tag = ber_object[1].ber_identifier & 31
+ @ldap_controls = []
rescue
# any error becomes a data-format error
raise LdapPduError.new( "ldap-pdu format error" )
@@ -144,7 +145,7 @@ def result_code code = :resultCode
# Return RFC-2251 Controls if any.
# Messy. Does this functionality belong somewhere else?
def result_controls
- @ldap_controls || []
+ @ldap_controls
end
# Return serverSaslCreds, which are only present in BindResponse packets.

0 comments on commit 2835ecd

Please sign in to comment.