Results for: "Array.new"

This represents an error that was encountered during parsing.

No documentation available

Raised when trying to activate a gem, and the gem exists on the system, but not the requested version. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError to catch all types of load errors.

No documentation available
No documentation available

Raised by Gem::Resolver when a Gem::Dependency::Conflict reaches the toplevel. Indicates which dependencies were incompatible through conflict and conflicting_dependencies

Signals that a file permission error is preventing the user from operating on the given directory.

No documentation available

Raised by Gem::Validator when something is not right in a gem.

Raised by Gem::WebauthnListener when an error occurs during security device verification.

No documentation available

This class is responsible for generating initial code blocks that will then later be expanded.

The biggest concern when guessing code blocks, is accidentally grabbing one that contains only an “end”. In this example:

def dog
  begonn # misspelled `begin`
  puts "bark"
  end
end

The following lines would be matched (from bottom to top):

1) end

2) puts "bark"
   end

3) begonn
   puts "bark"
   end

At this point it has no where else to expand, and it will yield this inner code as a block

Not a URI component.

Raised when a mathematical function is evaluated outside of its domain of definition.

For example, since cos returns values in the range -1..1, its inverse function acos is only defined on that interval:

Math.acos(42)

produces:

Math::DomainError: Numerical argument is out of domain - "acos"
No documentation available

Flags for parameter nodes.

Description

Construct a new BlockCaller object.

If there is an error in preparing the ffi_cif or ffi_prep_closure, then a RuntimeError will be raised.

Example

include Fiddle

cb = Closure::BlockCaller.new(TYPE_INT, [TYPE_INT]) do |one|
  one
end

func = Function.new(cb, [TYPE_INT], TYPE_INT)

Creates a new JSON::Ext::Parser instance for the string source.

It will be configured by the opts hash. opts can have the following keys:

opts can have the following keys:

value: Please have a look at Constructive and Primitive to see how Ruby types are mapped to ASN.1 types and vice versa.

tag: An Integer indicating the tag number.

tag_class: A Symbol indicating the tag class. Please cf. ASN1 for possible values.

Example

asn1_int = OpenSSL::ASN1Data.new(42, 2, :UNIVERSAL) # => Same as OpenSSL::ASN1::Integer.new(42)
tagged_int = OpenSSL::ASN1Data.new(42, 0, :CONTEXT_SPECIFIC) # implicitly 0-tagged INTEGER
No documentation available
No documentation available
No documentation available

Creates a new instance of OpenSSL::PKey::DH.

If called without arguments, an empty instance without any parameter or key components is created. Use set_pqg to manually set the parameters afterwards (and optionally set_key to set private and public key components).

If a String is given, tries to parse it as a DER- or PEM- encoded parameters. See also OpenSSL::PKey.read which can parse keys of any kinds.

The DH.new(size [, generator]) form is an alias of DH.generate.

string

A String that contains the DER or PEM encoded key.

size

See DH.generate.

generator

See DH.generate.

Examples:

# Creating an instance from scratch
# Note that this is deprecated and will not work on OpenSSL 3.0 or later.
dh = OpenSSL::PKey::DH.new
dh.set_pqg(bn_p, nil, bn_g)

# Generating a parameters and a key pair
dh = OpenSSL::PKey::DH.new(2048) # An alias of OpenSSL::PKey::DH.generate(2048)

# Reading DH parameters
dh_params = OpenSSL::PKey::DH.new(File.read('parameters.pem')) # loads parameters only
dh = OpenSSL::PKey.generate_key(dh_params) # generates a key pair

Creates a new DSA instance by reading an existing key from string.

If called without arguments, creates a new instance with no key components set. They can be set individually by set_pqg and set_key.

If called with a String, tries to parse as DER or PEM encoding of a DSA key. See also OpenSSL::PKey.read which can parse keys of any kinds.

If called with a number, generates random parameters and a key pair. This form works as an alias of DSA.generate.

string

A String that contains a DER or PEM encoded key.

pass

A String that contains an optional password.

size

See DSA.generate.

Examples:

p OpenSSL::PKey::DSA.new(1024)
#=> #<OpenSSL::PKey::DSA:0x000055a8d6025bf0 oid=DSA>

p OpenSSL::PKey::DSA.new(File.read('dsa.pem'))
#=> #<OpenSSL::PKey::DSA:0x000055555d6b8110 oid=DSA>

p OpenSSL::PKey::DSA.new(File.read('dsa.pem'), 'mypassword')
#=> #<OpenSSL::PKey::DSA:0x0000556f973c40b8 oid=DSA>

Creates a new EC object from given arguments.

Search took: 6ms  ·  Total Results: 3535