Project

General

Profile

Bug #4376

rdoc can't handle correctly the return value when the file has invalid character

Added by naruse (Yui NARUSE) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-02-07 trunk 30813) [x86_64-freebsd8.2]
Backport:
[ruby-core:35129]

Description

=begin
From r30806 to r30813, make rdoc raises error on LANG=C environment like:
http://59.106.172.211/~chkbuild/ruby-trunk/log/20110207T010100Z.log.html.gz

This is because the encoding of output is set to US-ASCII, failed character
encoding conversion on doc/re.rdoc, and wrongly treated nil as String.

The main bug is set to US-ASCII, so I fixed it in r30813.
But nil treatment should be rdoc's bug, so I report this.

Generating RDoc documentation
Parsing sources...
unable to convert U+6771 from UTF-8 to US-ASCII for ../../ruby/doc/re.rdoc, skipping
Before reporting this, could you check that the file you're documenting
has proper syntax:

/home/naruse/local/ruby/bin/ruby -c ../../ruby/re.c

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

     (NoMethodError) undefined method `sub' for nil:NilClass

/home/naruse/ruby/lib/rdoc/markup/pre_process.rb:126:in include_file'
/home/naruse/ruby/lib/rdoc/markup/pre_process.rb:76:in
block in handle'
/home/naruse/ruby/lib/rdoc/markup/pre_process.rb:61:in gsub!'
/home/naruse/ruby/lib/rdoc/markup/pre_process.rb:61:in
handle'
/home/naruse/ruby/lib/rdoc/parser/c.rb:867:in look_for_directives_in'
/home/naruse/ruby/lib/rdoc/parser/c.rb:516:in
find_class_comment'
/home/naruse/ruby/lib/rdoc/parser/c.rb:687:in handle_class_module'
/home/naruse/ruby/lib/rdoc/parser/c.rb:204:in
block in do_classes'
/home/naruse/ruby/lib/rdoc/parser/c.rb:199:in scan'
/home/naruse/ruby/lib/rdoc/parser/c.rb:199:in
do_classes'
/home/naruse/ruby/lib/rdoc/parser/c.rb:987:in scan'
/home/naruse/ruby/lib/rdoc/rdoc.rb:322:in
parse_file'
/home/naruse/ruby/lib/rdoc/rdoc.rb:367:in block in parse_files'
/home/naruse/ruby/lib/rdoc/rdoc.rb:365:in
map'
/home/naruse/ruby/lib/rdoc/rdoc.rb:365:in parse_files'
/home/naruse/ruby/lib/rdoc/rdoc.rb:423:in
document'
../../ruby/bin/rdoc:15:in <main>'
uh-oh! RDoc had a problem:
undefined method
sub' for nil:NilClass

run with --debug for full backtrace
*** Error code 1

Stop in /home/naruse/obj/ruby.
=end

Associated revisions

Revision 60f2c9cf
Added by drbrain (Eric Hodel) over 8 years ago

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 30815
Added by drbrain (Eric Hodel) over 8 years ago

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

Revision 30815
Added by drbrain (Eric Hodel) over 8 years ago

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

Revision 30815
Added by drbrain (Eric Hodel) over 8 years ago

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

Revision 30815
Added by drbrain (Eric Hodel) over 8 years ago

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

Revision 30815
Added by drbrain (Eric Hodel) over 8 years ago

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

Revision 30815
Added by drbrain (Eric Hodel) over 8 years ago

Upgrade to RDoc 3.5.3. Fixes [Bug #4376]

History

#1

Updated by drbrain (Eric Hodel) over 8 years ago

=begin
I have a fix for this bug, but it has uncovered a second bug.

I am still investigating.
=end

#2

Updated by drbrain (Eric Hodel) over 8 years ago

  • Status changed from Assigned to Closed

=begin
Fixed by import RDoc 3.5.3, 30815.

I have found further inconsistencies in the result encoding for some String methods, I will file those bugs separately.
=end

Also available in: Atom PDF