Ensures the root of chain
has a trusted certificate in trust_dir
and the digests of the two certificates match according to digester
Return the 2 dependency objects that conflicted
Returns true
if this gem is installable for the current platform.
Returns true
if this gem is installable for the current platform.
Returns true if this specification is installable on this platform.
Add a certificate to trusted certificate list.
Factory for servlet instances that will handle a request from server
using options
from the mount point. By default a new servlet instance is created for every call.
Creates a string representation of self
.
[ "a", "b", "c" ].to_s #=> "[\"a\", \"b\", \"c\"]"
Returns the first element, or the first n
elements, of the array. If the array is empty, the first form returns nil
, and the second form returns an empty array. See also Array#last
for the opposite effect.
a = [ "q", "r", "s", "t" ] a.first #=> "q" a.first(2) #=> ["q", "r"]
Returns the last element(s) of self
. If the array is empty, the first form returns nil
.
See also Array#first
for the opposite effect.
a = [ "w", "x", "y", "z" ] a.last #=> "z" a.last(2) #=> ["y", "z"]
Inserts the given values before the element with the given index
.
Negative indices count backwards from the end of the array, where -1
is the last element. If a negative index is used, the given values will be inserted after that element, so using an index of -1
will insert the values at the end of the array.
a = %w{ a b c d } a.insert(2, 99) #=> ["a", "b", 99, "c", "d"] a.insert(-2, 1, 2, 3) #=> ["a", "b", 99, "c", 1, 2, 3, "d"]
Returns the number of elements in self
. May be zero.
[ 1, 2, 3, 4, 5 ].length #=> 5 [].length #=> 0
Returns the index of the first object in ary
such that the object is ==
to obj
.
If a block is given instead of an argument, returns the index of the first object for which the block returns true
. Returns nil
if no match is found.
See also Array#rindex
.
An Enumerator
is returned if neither a block nor argument is given.
a = [ "a", "b", "c" ] a.index("b") #=> 1 a.index("z") #=> nil a.index {|x| x == "b"} #=> 1
Returns a string created by converting each element of the array to a string, separated by the given separator
. If the separator
is nil
, it uses current $,
. If both the separator
and $,
are nil
, it uses an empty string.
[ "a", "b", "c" ].join #=> "abc" [ "a", "b", "c" ].join("-") #=> "a-b-c"
For nested arrays, join is applied recursively:
[ "a", [1, 2, [:x, :y]], "b" ].join("-") #=> "a-1-2-x-y-b"