Skip to content

Commit

Permalink
Fix warning: instance variable @ldap_controls not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
emiel committed Feb 27, 2009
1 parent d6e6a97 commit 2835ecd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/net/ldap/pdu.rb
Expand Up @@ -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" )
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2835ecd

Please sign in to comment.