Results for: "pstore"

No documentation available

returns Regexp that is default self.regexp, unless schemes is provided. Then it is a Regexp.union with self.pattern

Constructs the default Hash of Regexp’s

returns Regexp that is default self.regexp, unless schemes is provided. Then it is a Regexp.union with self.pattern

Constructs the default Hash of Regexp’s

The client’s IP address

The response’s HTTP status line

Creates an error page for exception ex with an optional backtrace

Adds server as a virtual host.

Converts the contents of the database to an in-memory Hash object, and returns it.

Returns the destination encoding as an encoding object.

Returns the one-character string which cause Encoding::UndefinedConversionError.

ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP")
begin
  ec.convert("\xa0")
rescue Encoding::UndefinedConversionError
  puts $!.error_char.dump   #=> "\xC2\xA0"
  p $!.error_char.encoding  #=> #<Encoding:UTF-8>
end

Returns the destination encoding as an encoding object.

Returns the discarded bytes when Encoding::InvalidByteSequenceError occurs.

ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
  ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
  p $!      #=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
  puts $!.error_bytes.dump          #=> "\xA1"
  puts $!.readagain_bytes.dump      #=> "\xFF"
end

Returns the bytes to be read again when Encoding::InvalidByteSequenceError occurs.

Returns the destination encoding as an Encoding object.

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.

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:

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, []]

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

See also Fiddle::Importer.struct

Returns a new instance of the C struct with the value ty at the addr address.

Returns a new Fiddle::Pointer instance at the memory address of the given name symbol.

Raises a DLError if the name doesn’t exist.

See Fiddle::CompositeHandler.sym and Fiddle::Handle.sym

Returns a new Fiddle::Function instance at the memory address of the given name function.

Raises a DLError if the name doesn’t exist.

See also Fiddle:Function.new

See Fiddle::CompositeHandler.sym and Fiddle::Handler.sym

Similar to read, but raises EOFError at end of string unless the +exception: false+ option is passed in.

Reads at most maxlen bytes in the non-blocking manner.

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

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

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

OpenSSL::Buffering#read_nonblock needs two rescue clause as follows:

# emulates blocking read (readpartial).
begin
  result = ssl.read_nonblock(maxlen)
rescue IO::WaitReadable
  IO.select([io])
  retry
rescue IO::WaitWritable
  IO.select(nil, [io])
  retry
end

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

By specifying ‘exception: false`, the options hash allows you to indicate that read_nonblock should not raise an IO::Wait*able exception, but return the symbol :wait_writable or :wait_readable instead.

Generates string with length number of pseudo-random bytes.

Pseudo-random byte sequences generated by ::pseudo_bytes will be unique if they are of sufficient length, but are not necessarily unpredictable.

Example

OpenSSL::Random.pseudo_bytes(12)
#=> "..."
Search took: 4ms  ·  Total Results: 3307