Counts all objects grouped by type.
It returns a hash, such as:
{ :TOTAL=>10000, :FREE=>3011, :T_OBJECT=>6, :T_CLASS=>404, # ... }
The contents of the returned hash are implementation specific. It may be changed in future.
The keys starting with :T_
means live objects. For example, :T_ARRAY
is the number of arrays. :FREE
means object slots which is not used now. :TOTAL
means sum of above.
If the optional argument result_hash
is given, it is overwritten and returned. This is intended to avoid probe effect.
h = {} ObjectSpace.count_objects(h) puts h # => { :TOTAL=>10000, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249 }
This method is only expected to work on C Ruby.
Returns the version of libyaml being used
Returns the string which represents the version of zlib library.
Try to activate a gem containing path
. Returns true if activation succeeded or wasn’t needed because it was already activated. Returns false if it can’t find the path in a gem.
The version of the Marshal
format for your Ruby.
A Gem::Version
for the currently running Ruby.
A Gem::Version
for the currently running RubyGems
Returns location objects associated with the AST node. The returned array contains RubyVM::AbstractSyntaxTree::Location
.
Gets various OpenSSL
options.
Sets various OpenSSL
options.
The location of the token in the source.
Explanation of the conflict used by exceptions to print useful messages
Convert 64-bit FILETIME integer into Time
object.
Returns the type library version.
tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library') puts tlib.version #-> "1.3"
Returns the change time for stat (that is, the time directory information about the file was changed, not the file itself).
Note that on Windows (NTFS), returns creation time (birth time).
File.stat("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003
Returns true
; retained for compatibility.
True when the gem has been activated
Version of the gem