summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-23 23:33:09 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-23 23:33:09 +0000
commit9fe26ef8de1ae047a4d775ce74878a0aeb01a19b (patch)
tree2710c34bf6e5307a02b3a8924b3ab64b4bcbd05e /lib
parentdaaebaec79f60796b9c864907ad03d1e02b93fb2 (diff)
Merge rdoc-6.0.1.
It fixes an installation error of activerecord. https://github.com/ruby/rdoc/issues/571 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc.rb2
-rw-r--r--lib/rdoc/parser/ruby.rb7
-rw-r--r--lib/rdoc/rdoc.gemspec2
3 files changed, 9 insertions, 2 deletions
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",