diff options
author | murphy <murphy@rubychan.de> | 2010-03-30 01:42:20 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-03-30 01:42:20 +0000 |
commit | bb650f82019a6d1c706d07b4fc3e4f85b0f259c2 (patch) | |
tree | 66c5906b5600ba48501bff41b82a007ec98ec524 /lib/coderay/tokens.rb | |
parent | 431805471d6947a65f7d58aa47e7b9513421b23b (diff) | |
download | coderay-bb650f82019a6d1c706d07b4fc3e4f85b0f259c2.tar.gz |
Code cleanup.
Diffstat (limited to 'lib/coderay/tokens.rb')
-rw-r--r-- | lib/coderay/tokens.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/coderay/tokens.rb b/lib/coderay/tokens.rb index aa78ee7..0cefef2 100644 --- a/lib/coderay/tokens.rb +++ b/lib/coderay/tokens.rb @@ -101,7 +101,6 @@ module CodeRay encoder.encode_tokens self, options end - # Turn into a string using Encoders::Text. # # +options+ are passed to the encoder if given. @@ -129,7 +128,7 @@ module CodeRay # for example, consecutive //-comment lines could already be # joined in one comment token by the Scanner. def optimize - print ' Tokens#optimize: before: %d - ' % size if $DEBUG + # print ' Tokens#optimize: before: %d - ' % size last_kind = last_text = nil new = self.class.new for text, kind in self @@ -148,8 +147,7 @@ module CodeRay end end new << [last_text, last_kind] if last_kind - print 'after: %d (%d saved = %2.0f%%)' % - [new.size, size - new.size, 1.0 - (new.size.to_f / size)] if $DEBUG + # print 'after: %d (%d saved = %2.0f%%)' % [new.size, size - new.size, 1.0 - (new.size.to_f / size)] new end |