diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/rdoc.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/parser/ruby.rb | 7 | ||||
-rw-r--r-- | lib/rdoc/rdoc.gemspec | 2 |
4 files changed, 10 insertions, 3 deletions
@@ -344,7 +344,7 @@ with all sufficient information, see the ChangeLog file or Redmine * RDoc - * Update to RDoc 6.0.0. + * Update to RDoc 6.0.1. * Replace IRB based lexer with Ripper. * https://github.com/ruby/rdoc/pull/512 diff --git a/lib/rdoc.rb b/lib/rdoc.rb index fcdf9be4b1..fef3726b33 100644 --- a/lib/rdoc.rb +++ b/lib/rdoc.rb @@ -65,7 +65,7 @@ module RDoc ## # RDoc version you are using - VERSION = '6.0.0' + VERSION = '6.0.1' ## # Method visibilities diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index f1856acce8..8599f655ad 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -178,6 +178,7 @@ class RDoc::Parser::Ruby < RDoc::Parser @size = 0 @token_listeners = nil @scanner = RDoc::RipperStateLex.parse(content) + @content = content @scanner_point = 0 @prev_seek = nil @markup = @options.markup @@ -2067,6 +2068,12 @@ class RDoc::Parser::Ruby < RDoc::Parser parse_top_level_statements @top_level rescue StandardError => e + if @content.include?('<%') and @content.include?('%>') then + # Maybe, this is ERB. + $stderr.puts "\033[2KRDoc detects ERB file. Skips it for compatibility:" + $stderr.puts @file_name + return + end bytes = '' if @scanner_point >= @scanner.size diff --git a/lib/rdoc/rdoc.gemspec b/lib/rdoc/rdoc.gemspec index 57a66984fd..8c92908a66 100644 --- a/lib/rdoc/rdoc.gemspec +++ b/lib/rdoc/rdoc.gemspec @@ -8,7 +8,7 @@ end Gem::Specification.new do |s| s.name = "rdoc" s.version = RDoc::VERSION - s.date = "2017-12-05" + s.date = "2017-12-24" s.authors = [ "Eric Hodel", |