Results for: "module_function"

Prints the amount of time the supplied block takes to run using the debug UI output.

Raises a TypeError to prevent cloning.

No documentation available

Returns the singleton instance.

Perform an operation in a block, raising an error if it takes longer than sec seconds to complete.

sec

Number of seconds to wait for the block to terminate. Any number may be used, including Floats to specify fractional seconds. A value of 0 or nil will execute the block without any timeout.

klass

Exception Class to raise if the block fails to terminate in sec seconds. Omitting will use the default, Timeout::Error

message

Error message to raise with Exception Class. Omitting will use the default, “execution expired”

Returns the result of the block if the block completed before sec seconds, otherwise throws an exception, based on the value of klass.

The exception thrown to terminate the given block cannot be rescued inside the block unless klass is given explicitly. However, the block can use ensure to prevent the handling of the exception. For that reason, this method cannot be relied on to enforce timeouts for untrusted blocks.

If a scheduler is defined, it will be used to handle the timeout by invoking Scheduler#timeout_after.

Note that this is both a method of module Timeout, so you can include Timeout into your classes so they have a timeout method, as well as a module method, so you can call it directly as Timeout.timeout().

Perform an operation in a block, raising an error if it takes longer than sec seconds to complete.

sec

Number of seconds to wait for the block to terminate. Any number may be used, including Floats to specify fractional seconds. A value of 0 or nil will execute the block without any timeout.

klass

Exception Class to raise if the block fails to terminate in sec seconds. Omitting will use the default, Timeout::Error

message

Error message to raise with Exception Class. Omitting will use the default, “execution expired”

Returns the result of the block if the block completed before sec seconds, otherwise throws an exception, based on the value of klass.

The exception thrown to terminate the given block cannot be rescued inside the block unless klass is given explicitly. However, the block can use ensure to prevent the handling of the exception. For that reason, this method cannot be relied on to enforce timeouts for untrusted blocks.

If a scheduler is defined, it will be used to handle the timeout by invoking Scheduler#timeout_after.

Note that this is both a method of module Timeout, so you can include Timeout into your classes so they have a timeout method, as well as a module method, so you can call it directly as Timeout.timeout().

Gets the scheduling priority for specified process, process group, or user. kind indicates the kind of entity to find: one of Process::PRIO_PGRP, Process::PRIO_USER, or Process::PRIO_PROCESS. integer is an id indicating the particular process, process group, or user (an id of 0 means current). Lower priorities are more favorable for scheduling. Not available on all platforms.

Process.getpriority(Process::PRIO_USER, 0)      #=> 19
Process.getpriority(Process::PRIO_PROCESS, 0)   #=> 19

See Process.getpriority.

Process.setpriority(Process::PRIO_USER, 0, 19)      #=> 0
Process.setpriority(Process::PRIO_PROCESS, 0, 19)   #=> 0
Process.getpriority(Process::PRIO_USER, 0)          #=> 19
Process.getpriority(Process::PRIO_PROCESS, 0)       #=> 19

Returns a Tms structure (see Process::Tms) that contains user and system CPU times for this process, and also for children processes.

t = Process.times
[ t.utime, t.stime, t.cutime, t.cstime ]   #=> [0.0, 0.02, 0.00, 0.00]

Returns the form how EC::Point data is encoded as ASN.1.

See also point_conversion_form=.

Sets the form how EC::Point data is encoded as ASN.1 as defined in X9.62.

format can be one of these:

:compressed

Encoded as z||x, where z is an octet indicating which solution of the equation y is. z will be 0x02 or 0x03.

:uncompressed

Encoded as z||x||y, where z is an octet 0x04.

:hybrid

Encodes as z||x||y, where z is an octet indicating which solution of the equation y is. z will be 0x06 or 0x07.

See the OpenSSL documentation for EC_GROUP_set_point_conversion_form()

No documentation available
No documentation available

Add file name with permissions mode size bytes long. Yields an IO to write the file to.

Creates a digest object and reads a given file, name. Optional arguments are passed to the constructor of the digest class.

p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
# => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"

Array of the currently loaded libraries.

Clear the reference to the object this is pinning.

Returns true if the reference has been cleared, otherwise returns false.

Returns true if this is a null pointer.

No documentation available
No documentation available

It is only necessary to run cleanup when engines are loaded via OpenSSL::Engine.load. However, running cleanup before exit is recommended.

Note that this is needed and works only in OpenSSL < 1.1.0.

The file name of the input.

returns the cmsg level as an integer.

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").level
#=> 41

returns the socket level as an integer.

p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).level
#=> 41
Search took: 7ms  ·  Total Results: 3274