Checks for a method provided by this the delegate object by forwarding the call through _getobj_.
Returns the memory address for this closure
The integer memory location of this function
Returns the memory address for this handle.
Returns the integer memory location of this pointer.
ptr.to_s => string ptr.to_s(len) => string
Returns the pointer contents as a string.
When called with no arguments, this method will return the contents until the first NULL byte.
When called with len
, a string of len
bytes will be returned.
See to_str
base
- integer Valid values:
0 - MPI
2 - binary
10 - the default
16 - hex
Get the parsable form of the current configuration
Given the following configuration being created:
config = OpenSSL::Config.new #=> #<OpenSSL::Config sections=[]> config['default'] = {"foo"=>"bar","baz"=>"buz"} #=> {"foo"=>"bar", "baz"=>"buz"} puts config.to_s #=> [ default ] # foo=bar # baz=buz
You can parse get the serialized configuration using to_s
and then parse it later:
serialized_config = config.to_s # much later... new_config = OpenSSL::Config.parse(serialized_config) #=> #<OpenSSL::Config sections=["default"]> puts new_config #=> [ default ] foo=bar baz=buz
Returns the authentication code as a hex-encoded string. The digest
parameter must be an instance of OpenSSL::Digest
.
key = 'key' data = 'The quick brown fox jumps over the lazy dog' digest = OpenSSL::Digest.new('sha1') hmac = OpenSSL::HMAC.hexdigest(digest, key, data) #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
returns the socket option data as a string.
p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).data #=> "\x01\x00\x00\x00"
Returns an Array with 14 elements representing the instruction sequence with the following data:
A string identifying the data format. Always YARVInstructionSequence/SimpleDataFormat
.
The major version of the instruction sequence.
The minor version of the instruction sequence.
A number identifying the data format. Always 1.
A hash containing:
:arg_size
the total number of arguments taken by the method or the block (0 if iseq doesn’t represent a method or block)
:local_size
the number of local variables + 1
:stack_max
used in calculating the stack depth at which a SystemStackError
is thrown.
label
The name of the context (block, method, class, module, etc.) that this instruction sequence belongs to.
<main>
if it’s at the top level, <compiled>
if it was evaluated from a string.
path
The relative path to the Ruby file where the instruction sequence was loaded from.
<compiled>
if the iseq was evaluated from a string.
absolute_path
The absolute path to the Ruby file where the instruction sequence was loaded from.
nil
if the iseq was evaluated from a string.
first_lineno
The number of the first source line where the instruction sequence was loaded from.
The type of the instruction sequence.
Valid values are :top
, :method
, :block
, :class
, :rescue
, :ensure
, :eval
, :main
, and :defined_guard
.
An array containing the names of all arguments and local variables as symbols.
An Hash
object containing parameter information.
More info about these values can be found in vm_core.h
.
A list of exceptions and control flow operators (rescue, next, redo, break, etc.).
An array of arrays containing the instruction names and operands that make up the body of the instruction sequence.
Note that this format is MRI specific and version dependent.
Same as format
.
Returns a new 6-element array, consisting of the label, user CPU time, system CPU time, children’s user CPU time, children’s system CPU time and elapsed real time.
Convert the Cookie
to its string representation.
Returns the table as an Array of Arrays. Headers will be the first row, then all of the field rows will follow.
Returns a String representation of the URI::FTP
Returns the attribute value, with entities replaced