Project

General

Profile

Bug #1386

Spurious class "ARGF.class" in ObjectSpace

Added by candlerb (Brian Candler) over 10 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.9.1 (2008-12-16 revision 20768) [i686-linux]ruby 1.8.6 (2008-
Backport:

Description

=begin
$ ruby19 -e 'ObjectSpace.each_object(Class) { |c| puts c if c.to_s =~ /./ }'
ARGF.class

However this 'class' is not accessible by name:

$ ruby19 -e 'puts Object.const_get("ARGF.class")'
-e:1:in const_get': wrong constant name ARGF.class (NameError)
from -e:1:in
'
=end

History

#1

Updated by candlerb (Brian Candler) over 10 years ago

=begin
Sorry, I set the ruby -v field wrongly, but cannot edit it. It should have been:

$ ruby19 -v
ruby 1.9.1 (2008-12-16 revision 20768) [i686-linux]

=end

#2

Updated by matz (Yukihiro Matsumoto) over 10 years ago

  • Status changed from Open to Rejected
  • Assignee set to matz (Yukihiro Matsumoto)
  • ruby -v changed from ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux] to ruby 1.9.1 (2008-12-16 revision 20768) [i686-linux]ruby 1.8.6 (2008-

=begin
We have never guaranteed that

c == Object.const_get(c.to_s)

where c is a class. So I don't consider this as a bug.

=end

Also available in: Atom PDF