summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-23 13:15:10 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-23 13:15:10 +0200
commitc8751fbc09d4a8f43b0b037e3a7dc7ddbfbcacb1 (patch)
treed73e70a1b27543bad83d43af89d2b8f63294d205 /lib
parentad5efeb8c96c976804fcfcd3f71e0d02cf73cc10 (diff)
downloadcoderay-c8751fbc09d4a8f43b0b037e3a7dc7ddbfbcacb1.tar.gz
fix unclosed token group in Ruby scanner
Diffstat (limited to 'lib')
-rw-r--r--lib/coderay/scanners/ruby.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index c282f31..80165ca 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -269,7 +269,7 @@ module Scanners
end
if last_state
- state = last_state
+ state = last_state unless state.is_a?(StringState) # otherwise, a simple 'def"' results in unclosed tokens
last_state = nil
end