Split ldif test data file so regexp in 1.9.1 works

This commit is contained in:
Rory O'Connell 2010-04-15 17:01:43 -05:00
parent 896eaa533c
commit 6e9125df79

View file

@ -50,7 +50,9 @@ class TestLdif < Test::Unit::TestCase
data = File.open(TestLdifFilename, "rb") { |f| f.read }
io = StringIO.new(data)
entries = data.grep(/^dn:\s*/) { $'.chomp }
# added .lines to turn to array because 1.9 doesn't have
# .grep on basic strings
entries = data.lines.grep(/^dn:\s*/) { $'.chomp }
dn_entries = entries.dup
ds = Net::LDAP::Dataset::read_ldif(io) { |type, value|