From 7bf48ce6cf5c75a2278d6545f02781a79f53ebbb Mon Sep 17 00:00:00 2001 From: murphy Date: Sat, 1 May 2010 02:58:17 +0000 Subject: Got rid of the old streaming system (see #142). --- lib/coderay/duo.rb | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'lib/coderay/duo.rb') diff --git a/lib/coderay/duo.rb b/lib/coderay/duo.rb index 5468dda..c11bd3f 100644 --- a/lib/coderay/duo.rb +++ b/lib/coderay/duo.rb @@ -23,9 +23,6 @@ module CodeRay # simple: # CodeRay::Duo[:ruby, :page].highlight 'bla 42' # - # streaming: - # CodeRay::Duo[:ruby, :page].highlight 'bar 23', :stream => true - # # with options: # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??' # @@ -64,18 +61,9 @@ module CodeRay end # Tokenize and highlight the code using +scanner+ and +encoder+. - # - # If the :stream option is set, the Duo will go into streaming mode, - # saving memory for the cost of time. - def encode code, options = { :stream => false } - stream = options.delete :stream + def encode code, options = {} options = @options.merge options - if stream - encoder.encode_stream(code, @lang, options) - else - scanner.code = code - encoder.encode_tokens(scanner.tokenize, options) - end + encoder.encode(code, @lang, options) end alias highlight encode -- cgit v1.2.1