From 3bcfb2300689d3ab086c705f39dce2ae9815d8e0 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Mon, 20 Nov 2006 16:49:27 +0000 Subject: Removed restriction on edge case for begging string not being repetitive. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@393 19e92222-5c0b-0410-8929-a290d50e31e9 --- ext/http11/http11.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'ext/http11/http11.c') diff --git a/ext/http11/http11.c b/ext/http11/http11.c index 9c623fc..ef51ebb 100644 --- a/ext/http11/http11.c +++ b/ext/http11/http11.c @@ -245,13 +245,6 @@ VALUE BMHSearch_init(VALUE self, VALUE needle, VALUE max_find) S->needle = ALLOC_N(unsigned char, S->nlen); memcpy(S->needle, RSTRING(needle)->ptr, S->nlen); - // the only restriction on the needle so far is that you can't have repeat chars - if(S->needle[0] == S->needle[1]) { - free(S->needle); - S->needle = NULL; - rb_raise(eBMHSearchError, "Needle can't begin with > 1 of the same char."); - } - // setup the number of finds they want S->found_at = ALLOC_N(size_t, S->max_find); -- cgit v1.2.3-24-ge0c7