The file name and line number of the caller of the caller of this method.
depth
is how many layers up the call stack it should go.
e.g.,
def a; Gem.location_of_caller
; end a #=> [“x.rb”, 2] # (it’ll vary depending on file name and line number)
def b; c; end def c; Gem.location_of_caller(2)
; end b #=> [“x.rb”, 6] # (it’ll vary depending on file name and line number)
Like Enumerable#select
, but chains operation to be lazy-evaluated.
Call the free function for this pointer. Calling more than once will do nothing. Does nothing if there is no free function attached.
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.
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