mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
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
This commit is contained in:
parent
b5619586e8
commit
3bcfb23006
1 changed files with 0 additions and 7 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue