From 558956eaff25fd832ccd3dc5747365bf32cd3825 Mon Sep 17 00:00:00 2001 From: murphy Date: Sun, 11 Jan 2009 04:31:20 +0000 Subject: Fixed a bug in Ruby scanner that broke tests with JRuby. --- lib/coderay/scanners/ruby.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/coderay/scanners/ruby.rb') 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 -- cgit v1.2.1