Enable to measure GC time. You can get the result with GC.stat(:time)
. Note that GC time measurement can cause some performance overhead.
Return measure_total_time
flag (default: true
). Note that measurement can affect the application performance.
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.
Used by the Resolver, the protocol to use a AvailableSet
as a search Set
.
Return full names of all specs in sorted order.
Return full names of all specs in the record 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)
Like each_header
, but the keys are returned in capitalized form.
Net::HTTPHeader#canonical_each
is an alias for Net::HTTPHeader#each_capitalized
.