# File lib/em/buftok.rb, line 25 def initialize(delimiter = "\n", size_limit = nil) @delimiter = delimiter @size_limit = size_limit # The input buffer is stored as an array. This is by far the most efficient # approach given language constraints (in C a linked list would be a more # appropriate data structure). Segments of input data are stored in a list # which is only joined when a token is reached, substantially reducing the # number of objects required for the operation. @input = [] # Size of the input buffer @input_size = 0 end