ruby-changes:49315
From: hsbt <ko1@a...>
Date: Sun, 24 Dec 2017 08:33:15 +0900 (JST)
Subject: [ruby-changes:49315] hsbt:r61432 (trunk): Merge rdoc-6.0.1.
hsbt 2017-12-24 08:33:09 +0900 (Sun, 24 Dec 2017) New Revision: 61432 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61432 Log: Merge rdoc-6.0.1. It fixes an installation error of activerecord. https://github.com/ruby/rdoc/issues/571 Modified files: trunk/NEWS trunk/lib/rdoc/parser/ruby.rb trunk/lib/rdoc/rdoc.gemspec trunk/lib/rdoc.rb Index: NEWS =================================================================== --- NEWS (revision 61431) +++ NEWS (revision 61432) @@ -344,7 +344,7 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L344 * 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 Index: lib/rdoc.rb =================================================================== --- lib/rdoc.rb (revision 61431) +++ lib/rdoc.rb (revision 61432) @@ -65,7 +65,7 @@ module RDoc https://github.com/ruby/ruby/blob/trunk/lib/rdoc.rb#L65 ## # RDoc version you are using - VERSION = '6.0.0' + VERSION = '6.0.1' ## # Method visibilities Index: lib/rdoc/parser/ruby.rb =================================================================== --- lib/rdoc/parser/ruby.rb (revision 61431) +++ lib/rdoc/parser/ruby.rb (revision 61432) @@ -178,6 +178,7 @@ class RDoc::Parser::Ruby < RDoc::Parser https://github.com/ruby/ruby/blob/trunk/lib/rdoc/parser/ruby.rb#L178 @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 https://github.com/ruby/ruby/blob/trunk/lib/rdoc/parser/ruby.rb#L2068 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 Index: lib/rdoc/rdoc.gemspec =================================================================== --- lib/rdoc/rdoc.gemspec (revision 61431) +++ lib/rdoc/rdoc.gemspec (revision 61432) @@ -8,7 +8,7 @@ end https://github.com/ruby/ruby/blob/trunk/lib/rdoc/rdoc.gemspec#L8 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", -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/