Project

General

Profile

Actions

Bug #549

closed

ri -f html mungles constants

Added by trans (Thomas Sawyer) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2009-07-23 trunk 24250) [i386-darwin9.7.0]
Backport:
[ruby-core:18479]

Description

=begin
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:

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:

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

Class methods:

summary_on_exit

Notice that the constants are not displayed correctly.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0