Project

General

Profile

Bug #5354

Module#remove_const documentation is confusing

Added by agrimm (Andrew Grimm) over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
Backport:
[ruby-core:39676]

Description

=begin
The documentation for Module#remove_const says:

Removes the definition of the given constant, returning that constant’s value. Predefined classes and singleton objects (such as true) cannot be removed.

Based on this documentation, someone said in http://stackoverflow.com/q/7513727/38765 that you can't do remove_const on the File constant, whereas you can.

class Object
remove_const :File
end

File # => NameError: uninitialized constant File

=end


Related issues

Is duplicate of Ruby trunk - Bug #3769: Removing Predefined ConstantsClosed08/31/2010Actions

Associated revisions

Revision 092db4dc
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • variable.c: Simplify rdoc for remove_const [Bug #5354]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 35010
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • variable.c: Simplify rdoc for remove_const [Bug #5354]

Revision 35010
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • variable.c: Simplify rdoc for remove_const [Bug #5354]

Revision 35010
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • variable.c: Simplify rdoc for remove_const [Bug #5354]

Revision 35010
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • variable.c: Simplify rdoc for remove_const [Bug #5354]

Revision 35010
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • variable.c: Simplify rdoc for remove_const [Bug #5354]

Revision 35010
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • variable.c: Simplify rdoc for remove_const [Bug #5354]

Revision 45086d1b
Added by marcandre (Marc-Andre Lafortune) almost 7 years ago

merge revision(s) 35010:

    * variable.c: Simplify rdoc for remove_const [Bug #5354]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

Updated by marcandre (Marc-Andre Lafortune) almost 7 years ago

  • Status changed from Open to Closed

Fixed by Nobu in r29519. Thanks for reporting this issue.

Also available in: Atom PDF