Support pattern_create() lengths larger than the maximum set size

git-svn-id: file:///home/svn/framework3/trunk@5104 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-09-13 16:11:33 +00:00
parent 4e666aca1c
commit 7cc30f0fa8
1 changed files with 6 additions and 1 deletions

View File

@ -690,7 +690,12 @@ module Text
break
end
end
# Maximum permutations reached, but we need more data
if (buf.length < length)
buf = buf * (length / buf.length.to_f).ceil
end
buf[0,length]
end