The following unit test fails with ruby1.9 while works with ruby1.8.7:
#!/usr/bin/env ruby
#encoding: UTF-8
require 'rubygems'
gem 'test-unit'
require 'test/unit'
require 'ldap'
require 'ldap/ldif'
p RUBY_VERSION
def test_ldap_mod_to_ldif
mod = LDAP::Mod.new(LDAP::LDAP_MOD_REPLACE, "uid", ["tizio", "caio"])
assert mod
assert LDAP::LDIF.mods_to_ldif("uid=tizio,ou=people,dc=test,dc=com", mod)
end
end
as far as I can see, it looks it relies on String.respond_to? :each which works on ruby1.8.7 and not in ruby1.9
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I think it could be enought to change line 510 in ldif.rb to:
ldif << LDIF.to_ldif( change_type, [ mod.mod_type ] )