Results for: "Pathname"

Checks the password v component for RFC2396 compliance and against the URI::Parser Regexp for :USERINFO.

Can not have a registry or opaque component defined, with a user component defined.

Protected setter for the password component v.

See also URI::Generic.password=.

Escapes ‘user:password’ v based on RFC 1738 section 3.1.

Returns the password component after URI decoding.

Checks the opaque v component for RFC2396 compliance and against the URI::Parser Regexp for :OPAQUE.

Can not have a host, port, user, or path component defined, with an opaque component defined.

Protected setter for the opaque component v.

See also URI::Generic.opaque=.

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 attributes val.

Returns an array containing the values associated with the given keys.

Calls the given block once for each key, value pair in the database.

Returns self.

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.

Synonym for CGI.escapeElement(str)

Synonym for CGI.unescapeElement(str)

Format a Time object as a String using the format specified by RFC 1123.

CGI.rfc1123_date(Time.now)
  # Sat, 01 Jan 2000 00:00:00 GMT

Returns the length of the hash value of the digest.

This method should be overridden by each implementation subclass. If not, digest_obj.digest().length() is returned.

Returns the block length of the digest.

This method is overridden by each implementation subclass.

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

Creates a class to wrap the C struct with the value ty

See also Fiddle::Importer.struct

Consumes size bytes from the buffer

Generates a new key (pair).

If a String is given as the first argument, it generates a new random key for the algorithm specified by the name just as ::generate_parameters does. If an OpenSSL::PKey::PKey is given instead, it generates a new random key for the same algorithm as the key, using the parameters the key contains.

See ::generate_parameters for the details of options and the given block.

Example

pkey_params = OpenSSL::PKey.generate_parameters("DSA", "dsa_paramgen_bits" => 2048)
pkey_params.priv_key #=> nil
pkey = OpenSSL::PKey.generate_key(pkey_params)
pkey.priv_key #=> #<OpenSSL::BN 6277...

Returns an Array of individual raw profile data Hashes ordered from earliest to latest by :GC_INVOKE_TIME.

For example:

[
  {
     :GC_TIME=>1.3000000000000858e-05,
     :GC_INVOKE_TIME=>0.010634999999999999,
     :HEAP_USE_SIZE=>289640,
     :HEAP_TOTAL_SIZE=>588960,
     :HEAP_TOTAL_OBJECTS=>14724,
     :GC_IS_MARKED=>false
  },
  # ...
]

The keys mean:

:GC_TIME

Time elapsed in seconds for this GC run

:GC_INVOKE_TIME

Time elapsed in seconds from startup to when the GC was invoked

:HEAP_USE_SIZE

Total bytes of heap used

:HEAP_TOTAL_SIZE

Total size of heap in bytes

:HEAP_TOTAL_OBJECTS

Total number of objects

:GC_IS_MARKED

Returns true if the GC is in mark phase

If ruby was built with GC_PROFILE_MORE_DETAIL, you will also have access to the following hash keys:

:GC_MARK_TIME
:GC_SWEEP_TIME
:ALLOCATE_INCREASE
:ALLOCATE_LIMIT
:HEAP_USE_PAGES
:HEAP_LIVE_OBJECTS
:HEAP_FREE_OBJECTS
:HAVE_FINALIZE

The total time used for garbage collection in seconds

Search took: 4ms  ·  Total Results: 2267