Bug #549

ri -f html mungles constants

Added by trans (Thomas Sawyer) over 3 years ago. Updated about 1 year ago.

[ruby-core:18479]
Status:Closed Start date:09/07/2008
Priority:Normal Due date:
Assignee:drbrain (Eric Hodel) % Done:

0%

Category:lib
Target version:1.9.2
ruby -v:ruby 1.9.2dev (2009-07-23 trunk 24250) [i386-darwin9.7.0]

Description

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.

History

Updated by ko1 (Koichi Sasada) over 3 years ago

  • Assignee set to pragdave (Dave Thomas)

Updated by ko1 (Koichi Sasada) over 3 years ago

who's ball?

Updated by pragdave (Dave Thomas) over 3 years ago

  • Assignee changed from pragdave (Dave Thomas) to drbrain (Eric Hodel)
Eric now maintains ri/rdoc


Dave

Updated by yugui (Yuki Sonoda) over 3 years ago

  • Due date set to 11/25/2008
  • Target version set to 1.9.1 Release Candidate

Updated by yugui (Yuki Sonoda) over 3 years ago

I'll ask Eric whether it still happens.

Updated by drbrain (Eric Hodel) over 3 years ago

  • Priority changed from Normal to Low
It does still happen, but this bug is not unique to 1.9.  It should have been filed on the rdoc project on RubyForge.

Updated by yugui (Yuki Sonoda) over 3 years ago

  • Due date changed from 11/25/2008 to 12/24/2008

Updated by yugui (Yuki Sonoda) over 3 years ago

  • Due date deleted (12/24/2008)
  • Priority changed from Low to Normal
  • Target version changed from 1.9.1 Release Candidate to 1.9.2

Updated by drbrain (Eric Hodel) almost 3 years ago

  • ruby -v set to ruby 1.9.2dev (2009-07-23 trunk 24250) [i386-darwin9.7.0]
I've removed constant values from ri output in RDoc trunk.  irb or ruby -e should be used instead.

Updated by drbrain (Eric Hodel) about 2 years ago

  • Status changed from Open to Closed
Now checked in

Also available in: Atom PDF