[DRE-maint] Bug#836801: rdtool: rd2man-lib.rb crashes on MethodListItem

Francesco Poli (wintermute) invernomuto at paranoici.org
Mon Sep 5 21:58:22 UTC 2016


Package: rdtool
Version: 0.6.38-4
Severity: important

Hello and thanks for maintaining rdtool in Debian!

I think I found a bug in rd2man-lib.rb .
Steps to reproduce with the attached trivial Ruby Document file:

  $ rd2 -r rd/rd2html-lib.rb -o bar bar.rd

Everything's fine. The resulting HTML file looks OK:

  $ sensible-browser bar.html

But, if I want to get a man page:

  $ rd2 -r rd/rd2man-lib.rb -o bar bar.rd
  /usr/lib/ruby/vendor_ruby/rd/rd2man-lib.rb:127:in `apply_to_MethodListItem': undefined method `join' for "bar#run()":String (NoMethodError)
          from /usr/lib/ruby/vendor_ruby/rd/visitor.rb:64:in `visit_MethodListItem'
          from /usr/lib/ruby/vendor_ruby/rd/methodlist.rb:25:in `accept'
          from /usr/lib/ruby/vendor_ruby/rd/visitor.rb:20:in `block in visit_children'
          from /usr/lib/ruby/vendor_ruby/rd/element.rb:50:in `block in each_child'
          from /usr/lib/ruby/vendor_ruby/rd/element.rb:49:in `each'
          from /usr/lib/ruby/vendor_ruby/rd/element.rb:49:in `each_child'
          from /usr/lib/ruby/vendor_ruby/rd/visitor.rb:19:in `visit_children'
          from (eval):2:in `visit_MethodList'
          from /usr/lib/ruby/vendor_ruby/rd/methodlist.rb:9:in `accept'
          from /usr/lib/ruby/vendor_ruby/rd/visitor.rb:20:in `block in visit_children'
          from /usr/lib/ruby/vendor_ruby/rd/element.rb:50:in `block in each_child'
          from /usr/lib/ruby/vendor_ruby/rd/element.rb:49:in `each'
          from /usr/lib/ruby/vendor_ruby/rd/element.rb:49:in `each_child'
          from /usr/lib/ruby/vendor_ruby/rd/visitor.rb:19:in `visit_children'
          from (eval):2:in `visit_DocumentElement'
          from /usr/lib/ruby/vendor_ruby/rd/element.rb:151:in `accept'
          from /usr/lib/ruby/vendor_ruby/rd/tree.rb:79:in `accept'
          from /usr/lib/ruby/vendor_ruby/rd/visitor.rb:14:in `visit'
          from /usr/lib/ruby/vendor_ruby/rd/rd2man-lib.rb:39:in `visit'
          from /usr/bin/rd2:247:in `<main>'

and no output is obtained.

Is there anything I failed to understand?

If this is indeed a bug in rd2man-lib.rb, please investigate the issue
and fix it, and/or forward my bug report upstream.

Thanks for your time.
Bye.


P.S.: I think the attached test case is so trivial that it is not copyrighted.
      Hence no license should be needed, for the file to be copied, modified,
      and/or distributed. Anyway, should this turn out to be false, I hereby
      grant premission to deal with the file under the terms of the Expat/MIT
      license <http://www.jclark.com/xml/copying.txt>


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages rdtool depends on:
ii  ruby     1:2.3.0+4
ii  ruby-rd  0.6.38-4

rdtool recommends no packages.

rdtool suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bar.rd.gz
Type: application/gzip
Size: 110 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20160905/15d35f76/attachment.bin>


More information about the Pkg-ruby-extras-maintainers mailing list