Return consuming memory size of all living objects.
If klass
(should be Class
object) is given, return the total memory size of instances of the given class.
Note that the returned size is incomplete. You need to deal with this information as only a HINT. Especially, the size of T_DATA
may not be correct.
Note that this method does NOT return total malloc’ed memory size.
This method can be defined by the following Ruby code:
def memsize_of_all klass = false total = 0 ObjectSpace.each_object{|e| total += ObjectSpace.memsize_of(e) if klass == false || e.kind_of?(klass) } total end
This method is only expected to work with C Ruby.
The file name and line number of the caller of the caller of this method.
Returns the total bytes of the input data to the stream. FIXME
Returns the total bytes of the output data from the stream. FIXME
Returns true
if stat is writable by the real user id of this process.
File.stat("testfile").writable_real? #=> true
Same as executable?
, but tests using the real owner of the process.
Starts a POP3
session and deletes all messages on the server. If a block is given, each POPMail
object is yielded to it before being deleted.
This method raises a POPAuthenticationError
if authentication fails.
Net::POP3.delete_all('pop.example.com', 110, 'YourAccount', 'YourPassword') do |m| file.write m.pop end
Deletes all messages on the server.
If called with a block, yields each message in turn before deleting it.
n = 1 pop.delete_all do |m| File.open("inbox/#{n}") do |f| f.write m.pop end n += 1 end
This method raises a POPError
if an error occurs.
true if this object uses STARTTLS.
@return the XMLDecl
standalone value of this document as a String. If no XMLDecl
has been set, returns the default setting.
Removes multiple elements. Filters for Element
children, regardless of XPath
matching.
all elements matching this String path are removed.
an Array of Elements
that have been removed
doc = Document.new '<a><c/><c/><c/><c/></a>' deleted = doc.elements.delete_all 'a/c' #-> [<c/>, <c/>, <c/>, <c/>]
Deletes all attributes matching a name. Namespaces are significant.
A String; all attributes that match this path will be removed
an Array of the Attributes
that were removed
Reads all tuples matching tuple
from the proxied TupleSpace
. See TupleSpace#read_all
.
Finds all live tuples that match template
.
Returns all tuples matching tuple
. Does not remove the found tuples.
Used by the Resolver, the protocol to use a AvailableSet
as a search Set
.
Return full names of all specs in sorted order.
Similar to decode
with the difference that decode
expects one distinct value represented in der
. decode_all
on the contrary decodes a sequence of sequential BER/DER values lined up in der
and returns them as an array.
ders = File.binread('asn1data_seq') asn1_ary = OpenSSL::ASN1.decode_all(ders)
The total time used for garbage collection in seconds