diff --git a/lib/net/ldap/pdu.rb b/lib/net/ldap/pdu.rb index 382c7acb..26f166b4 100644 --- a/lib/net/ldap/pdu.rb +++ b/lib/net/ldap/pdu.rb @@ -84,7 +84,7 @@ class Error < RuntimeError; end def initialize(ber_object) begin - @message_id = ber_object[0].to_i + @message_id = ber_object[0] # Grab the bottom five bits of the identifier so we know which type of # PDU this is. # @@ -94,7 +94,7 @@ def initialize(ber_object) @app_tag = ber_object[1].ber_identifier & 0x1f @ldap_controls = [] rescue Exception => ex - raise Net::LDAP::PDU::Error, "LDAP PDU Format Error: #{ex.message}" + raise Net::LDAP::PDU::Error, "LDAP PDU Format Error: #{ex.message} Ber Object is #{ber_object}" end case @app_tag @@ -123,7 +123,7 @@ def initialize(ber_object) when ExtendedResponse parse_extended_response(ber_object[1]) else - raise LdapPduError.new("unknown pdu-type: #{@app_tag}") + raise Net::LDAP::PDU::Error, "unknown pdu-type: #{@app_tag}" end parse_controls(ber_object[2]) if ber_object[2] diff --git a/lib/net/ldap/version.rb b/lib/net/ldap/version.rb index d0c61424..003b109c 100644 --- a/lib/net/ldap/version.rb +++ b/lib/net/ldap/version.rb @@ -1,5 +1,5 @@ module Net class LDAP - VERSION = "0.16.2" + VERSION = "0.16.2.3" end end