diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-03-11 01:18:51 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-03-11 01:18:51 +0100 |
commit | e18ebab2c3419675212ccf6e2dec70497bee2b7f (patch) | |
tree | cab344a3a1a25e57404ee6a520203956cb1a82f1 /lib/coderay | |
parent | af5d3ac98d36253452c779ba3663f4c72dfb3823 (diff) | |
download | coderay-e18ebab2c3419675212ccf6e2dec70497bee2b7f.tar.gz |
vastly improve Debug encoder speed on Ruby 1.9.3
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/encoders/debug.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/encoders/debug.rb b/lib/coderay/encoders/debug.rb index 95d6138..62f9f0a 100644 --- a/lib/coderay/encoders/debug.rb +++ b/lib/coderay/encoders/debug.rb @@ -28,7 +28,7 @@ module Encoders @out << text else # TODO: Escape ( - text = text.gsub(/[)\\]/, '\\\\\0') # escape ) and \ + text = text.gsub(/[)\\]/, '\\\\\0') if text.index(/[)\\]/) @out << kind.to_s << '(' << text << ')' end end |