summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-01-11 04:31:20 +0000
committermurphy <murphy@rubychan.de>2009-01-11 04:31:20 +0000
commit558956eaff25fd832ccd3dc5747365bf32cd3825 (patch)
tree6c1e4d2b3d2506009eb6626e7dcd3be736573a4f /lib/coderay/scanners/ruby.rb
parent055f73d6ea732ab6b323c884c70dfdb5c991d134 (diff)
downloadcoderay-558956eaff25fd832ccd3dc5747365bf32cd3825.tar.gz
Fixed a bug in Ruby scanner that broke tests with JRuby.
Diffstat (limited to 'lib/coderay/scanners/ruby.rb')
-rw-r--r--lib/coderay/scanners/ruby.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb
index 1bbfe07..90c640a 100644
--- a/lib/coderay/scanners/ruby.rb
+++ b/lib/coderay/scanners/ruby.rb
@@ -191,6 +191,7 @@ module Scanners
depth -= 1
if depth == 0 # closing brace of inline block reached
state, depth, heredocs = inline_block_stack.pop
+ heredocs = nil if heredocs && heredocs.empty?
tokens << [match, :inline_delimiter]
kind = :inline
match = :close
@@ -346,7 +347,7 @@ module Scanners
value_expected = value_expected == :set
last_token_dot = last_token_dot == :set
end
-
+
if $DEBUG and not kind
raise_inspect 'Error token %p in line %d' %
[[match, kind], line], tokens, state