Bug #549: ri -f html mungles constants
http://redmine.ruby-lang.org/issues/show/549

Author: Thomas Sawyer
Status: Open, Priority: Normal
Category: lib

The example I'll use here is with Bacon. Regular output of 'ri Bacon' produces:

  ----------------------------------------------------------- Class: Bacon
     Copyright (C) 2007, 2008 Christian Neukirchen
     <purl.org/net/chneukirchen>

     Bacon is freely distributable under the terms of an MIT-style
     license. See COPYING or
     http://www.opensource.org/licenses/mit-license.php.

  ------------------------------------------------------------------------


  Constants:
  ----------
     VERSION:         "1.0"
     Counter:         Hash.new(0)
     ErrorLog:        ""
     Shared:          Hash.new { |_, name|     raise NameError, "no such
                      context: #{name.inspect}"
     RestrictName:    //  unless defined? RestrictName
     RestrictContext: //  unless defined? RestrictContext


  Class methods:
  --------------
     summary_on_exit

However if we do 'ri -f html Bacon' we get:

  <b>Class: Bacon</b><hr>
  Copyright (C) 2007, 2008 Christian Neukirchen &lt;purl.org/net/chneukirchen&gt;<p>
  Bacon is freely distributable under the terms of an MIT-style license. See COPYING or http://www.opensource.org/licenses/mit-license.php.<p>
  <hr>
  <p>
  <h2>Constants:</h2>
  &quot;1.0&quot;Hash.new(0)&quot;&quot;Hash.new { |_, name|     raise NameError, &quot;no such context: #{name.inspect}&quot;//  unless defined? RestrictName//  unless defined? RestrictContext<p>
  <h2>Class methods:</h2>
  summary_on_exit

Notice that the constants are not displayed correctly.


----------------------------------------
http://redmine.ruby-lang.org