From: Yui NARUSE Date: 2011-02-07T13:11:18+09:00 Subject: [ruby-core:35129] [Ruby 1.9-Bug#4376][Assigned] rdoc can't handle correctly the return value when the file has invalid character Bug #4376: rdoc can't handle correctly the return value when the file has invalid character http://redmine.ruby-lang.org/issues/show/4376 Author: Yui NARUSE Status: Assigned, Priority: Normal Assigned to: Eric Hodel, Category: lib ruby -v: ruby 1.9.3dev (2011-02-07 trunk 30813) [x86_64-freebsd8.2] 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 `
' 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. ---------------------------------------- http://redmine.ruby-lang.org