From 6e9125df79497388812a209a3c1e99189f2034e2 Mon Sep 17 00:00:00 2001 From: Rory O'Connell Date: Thu, 15 Apr 2010 17:01:43 -0500 Subject: [PATCH] Split ldif test data file so regexp in 1.9.1 works --- test/test_ldif.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_ldif.rb b/test/test_ldif.rb index b2c9f8c..c04e1e9 100644 --- a/test/test_ldif.rb +++ b/test/test_ldif.rb @@ -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|