Is GC a class or module?

Hi guys,

On page 8 of 2nd Pickaxe or when I type ri GC under a window prompt
command I get the message 1. It looks like GC is a class. But on page
426 and page 491 it says GC is a built-in module. Since in Ruby a module
and a class is different. So which one is correct? Do I miss something
in message 1?

Thanks,

Li

#############message 1

C:>ri GC
-------------------------------------------------------------- Class: GC
The +GC+ module provides an interface to Ruby’s mark and sweep
garbage collection mechanism. Some of the underlying methods are
also available via the +ObjectSpace+ module.


Class methods:

 disable, enable, start

Instance methods:

 garbage_collect

On Sat, Oct 21, 2006 at 09:59:45PM +0900, Li Chen wrote:
} Hi guys,
}
} On page 8 of 2nd Pickaxe or when I type ri GC under a window prompt
} command I get the message 1. It looks like GC is a class. But on page
} 426 and page 491 it says GC is a built-in module. Since in Ruby a
module
} and a class is different. So which one is correct? Do I miss something
} in message 1?

% irb
irb(main):001:0> GC.class
=> Module
irb(main):002:0>

} Thanks,
} Li
–Greg

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs