Results for: "partition"

No documentation available

Activate all unambiguously resolved runtime dependencies of this spec. Add any ambiguous dependencies to the unresolved list to be resolved later, as needed.

Is this specification missing its extensions? When this returns true you probably want to build_extensions

List of dependencies that will automatically be activated at runtime.

Checks if this specification meets the requirement of dependency.

No documentation available

Issues a warning for each file to be packaged which is world-readable.

Implementation for Specification#validate_permissions

Display a warning on stderr. Will ask question if it is not nil.

Returns an Array of the path split on ‘/’.

Returns an Array of the components defined from the COMPONENT Array.

Private method to cleanup dn from using the path component attribute.

Private method to cleanup attributes, scope, filter, and extensions from using the query component attribute.

Private setter for extensions val.

Invoked by IO#wait, IO#wait_readable, IO#wait_writable to ask whether the specified descriptor is ready for specified events within the specified timeout.

events is a bit mask of IO::READABLE, IO::WRITABLE, and IO::PRIORITY.

Suggested implementation should register which Fiber is waiting for which resources and immediately calling Fiber.yield to pass control to other fibers. Then, in the close method, the scheduler might dispatch all the I/O resources to fibers waiting for it.

Expected to return the subset of events that are ready immediately.

Invoked by IO#write to write length bytes to io from from a specified buffer (see IO::Buffer).

The length argument is the “(minimum) length to be written”. If the IO buffer size is 8KiB, but the length specified is 1024 (1KiB), at most 8KiB will be written, but at least 1KiB will be. Generally, the only case where less data than length will be written is if there is an error writing the data.

Specifying a length of 0 is valid and means try writing at least once, as much data as possible.

Suggested implementation should try to write to io in a non-blocking manner and call io_wait if the io is not ready (which will yield control to other fibers).

See IO::Buffer for an interface available to get data from buffer efficiently.

Expected to return number of bytes written, or, in case of an error, -errno (negated number corresponding to system’s error code).

The method should be considered experimental.

Invoked by IO::Buffer#pwrite. See that method for description of arguments.

Invoked by Timeout.timeout to execute the given block within the given duration. It can also be invoked directly by the scheduler or user code.

Attempt to limit the execution time of a given block to the given duration if possible. When a non-blocking operation causes the block‘s execution time to exceed the specified duration, that non-blocking operation should be interrupted by raising the specified exception_class constructed with the given exception_arguments.

General execution timeouts are often considered risky. This implementation will only interrupt non-blocking operations. This is by design because it’s expected that non-blocking operations can fail for a variety of unpredictable reasons, so applications should already be robust in handling these conditions and by implication timeouts.

However, as a result of this design, if the block does not invoke any non-blocking operations, it will be impossible to interrupt it. If you desire to provide predictable points for timeouts, consider adding +sleep(0)+.

If the block is executed successfully, its result will be returned.

The exception will typically be raised using Fiber#raise.

Reads the file from pathname, then parses it like ::parse, returning the root node of the abstract syntax tree.

SyntaxError is raised if pathname’s contents are not valid Ruby syntax.

RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb")
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-31:3>

See ::parse for explanation of keyword argument meaning and usage.

Parses a C prototype signature

If Hash tymap is provided, the return value and the arguments from the signature are expected to be keys, and the value will be the C type to be looked up.

Example:

require 'fiddle/import'

include Fiddle::CParser
  #=> Object

parse_signature('double sum(double, double)')
  #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]]

parse_signature('void update(void (*cb)(int code))')
  #=> ["update", Fiddle::TYPE_VOID, [Fiddle::TYPE_VOIDP]]

parse_signature('char (*getbuffer(void))[80]')
  #=> ["getbuffer", Fiddle::TYPE_VOIDP, []]

Given a String of C type ty, returns the corresponding Fiddle constant.

ty can also accept an Array of C type Strings, and will be returned in a corresponding Array.

If Hash tymap is provided, ty is expected to be the key, and the value will be the C type to be looked up.

Example:

require 'fiddle/import'

include Fiddle::CParser
  #=> Object

parse_ctype('int')
  #=> Fiddle::TYPE_INT

parse_ctype('double diff')
  #=> Fiddle::TYPE_DOUBLE

parse_ctype('unsigned char byte')
  #=> -Fiddle::TYPE_CHAR

parse_ctype('const char* const argv[]')
  #=> -Fiddle::TYPE_VOIDP
No documentation available

Writes s in the non-blocking manner.

If there is buffered data, it is flushed first. This may block.

write_nonblock returns number of bytes written to the SSL connection.

When no data can be written without blocking it raises OpenSSL::SSL::SSLError extended by IO::WaitReadable or IO::WaitWritable.

IO::WaitReadable means SSL needs to read internally so write_nonblock should be called again after the underlying IO is readable.

IO::WaitWritable means SSL needs to write internally so write_nonblock should be called again after underlying IO is writable.

So OpenSSL::Buffering#write_nonblock needs two rescue clause as follows.

# emulates blocking write.
begin
  result = ssl.write_nonblock(str)
rescue IO::WaitReadable
  IO.select([io])
  retry
rescue IO::WaitWritable
  IO.select(nil, [io])
  retry
end

Note that one reason that write_nonblock reads from the underlying IO is when the peer requests a new TLS/SSL handshake. See the openssl FAQ for more details. www.openssl.org/support/faq.html

By specifying a keyword argument exception to false, you can indicate that write_nonblock should not raise an IO::Wait*able exception, but return the symbol :wait_writable or :wait_readable instead.

Generates new parameters for the algorithm. algo_name is a String that represents the algorithm. The optional argument options is a Hash that specifies the options specific to the algorithm. The order of the options can be important.

A block can be passed optionally. The meaning of the arguments passed to the block varies depending on the implementation of the algorithm. The block may be called once or multiple times, or may not even be called.

For the supported options, see the documentation for the ‘openssl genpkey’ utility command.

Example

pkey = OpenSSL::PKey.generate_parameters("DSA", "dsa_paramgen_bits" => 2048)
p pkey.p.num_bits #=> 2048
No documentation available

The total time used for garbage collection in seconds

Search took: 5ms  ·  Total Results: 2657