It was easily reproducible as follows.

% ruby -vrldap -e 'conn=LDAP::Conn.new;conn.bind{};conn.bind{}'
ruby 1.6.7 (2002-03-19) [i386-linux]
ruby: /home/wichert/ldap/openldap2-2.0.23/libraries/libldap/sasl.c:67: ldap_sasl
_bind: Assertion `( ( ld )->ld_options.ldo_valid == 0x2 )' failed.
zsh: abort      ruby -vrldap -e 'conn=LDAP::Conn.new;conn.bind{};conn.bind{}'


The reason is that I can call `conn.bind' using the ld structure which
became invalid by `ldap_unbind'. see ldap_unbind(3).