summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2006-07-09 22:24:43 +0000
committermurphy <murphy@rubychan.de>2006-07-09 22:24:43 +0000
commit81ee35212774f6d3faacbbce5bcabbf3aaba3064 (patch)
treecf7cc6f9ef1a2c4d9dafc023f514204592556129 /lib/coderay/scanners/ruby.rb
parent5fd66b4d7f5eae2ce9ddf68017ddb515104e361c (diff)
downloadcoderay-81ee35212774f6d3faacbbce5bcabbf3aaba3064.tar.gz
[BUG] Fixed bug in Ruby-Scanner (input ends with unfinished escape in string) (thanks to bovi again.)
Test case added.
Diffstat (limited to 'lib/coderay/scanners/ruby.rb')
-rw-r--r--lib/coderay/scanners/ruby.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index 6e08a1f..2a415eb 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -118,6 +118,8 @@ module Scanners
case m = getch
when state.delim, '\\'
tokens << [match + m, :char]
+ when nil
+ tokens << [match, :error]
else
tokens << [match + m, :content]
end