General callback for OpenSSL
verify
Extracts the Gem::Specification
and raw metadata from the .gem file at path
.
Return an array of APISpecification objects matching DependencyRequest req
.
Finds all specs matching req
in all sets.
Finds all git gems matching req
Return an array of IndexSpecification objects matching DependencyRequest req
.
Returns an array of IndexSpecification objects matching DependencyRequest req
.
Returns an Array
of IndexSpecification objects matching the DependencyRequest req
.
The find_all
method must be implemented. It returns all Resolver Specification objects matching the given DependencyRequest req
.
Returns an Array
of VendorSpecification objects matching the DependencyRequest req
.
Finds all gems matching dep
in this set.
Returns a new array by rotating self
so that the element at count
is the first element of the new array.
If count
is negative then it rotates in the opposite direction, starting from the end of self
where -1
is the last element.
a = [ "a", "b", "c", "d" ] a.rotate #=> ["b", "c", "d", "a"] a #=> ["a", "b", "c", "d"] a.rotate(2) #=> ["c", "d", "a", "b"] a.rotate(-3) #=> ["b", "c", "d", "a"]
Rotates self
in place so that the element at count
comes first, and returns self
.
If count
is negative then it rotates in the opposite direction, starting from the end of the array where -1
is the last element.
a = [ "a", "b", "c", "d" ] a.rotate! #=> ["b", "c", "d", "a"] a #=> ["b", "c", "d", "a"] a.rotate!(2) #=> ["d", "a", "b", "c"] a.rotate!(-3) #=> ["a", "b", "c", "d"]
Invokes the given block once for each element of self
.
Creates a new array containing the values returned by the block.
See also Enumerable#collect
.
If no block is given, an Enumerator
is returned instead.
a = [ "a", "b", "c", "d" ] a.collect {|x| x + "!"} #=> ["a!", "b!", "c!", "d!"] a.map.with_index {|x, i| x * i} #=> ["", "b", "cc", "ddd"] a #=> ["a", "b", "c", "d"]
Invokes the given block once for each element of self
, replacing the element with the value returned by the block.
See also Enumerable#collect
.
If no block is given, an Enumerator
is returned instead.
a = [ "a", "b", "c", "d" ] a.map! {|x| x + "!" } a #=> [ "a!", "b!", "c!", "d!" ] a.collect!.with_index {|x, i| x[0...i] } a #=> ["", "b", "c!", "d!"]
The first three forms set the selected elements of self
(which may be the entire array) to obj
.
A start
of nil
is equivalent to zero.
A length
of nil
is equivalent to the length of the array.
The last three forms fill the array with the value of the given block, which is passed the absolute index of each element to be filled.
Negative values of start
count from the end of the array, where -1
is the last element.
a = [ "a", "b", "c", "d" ] a.fill("x") #=> ["x", "x", "x", "x"] a.fill("z", 2, 2) #=> ["x", "x", "z", "z"] a.fill("y", 0..1) #=> ["y", "y", "z", "z"] a.fill {|i| i*i} #=> [0, 1, 4, 9] a.fill(-2) {|i| i*i*i} #=> [0, 1, 8, 27]
When invoked with a block, yield all permutations of length n
of the elements of the array, then return the array itself.
If n
is not specified, yield all permutations of all elements.
The implementation makes no guarantees about the order in which the permutations are yielded.
If no block is given, an Enumerator
is returned instead.
Examples:
a = [1, 2, 3] a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] a.permutation(1).to_a #=> [[1],[2],[3]] a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]] a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] a.permutation(0).to_a #=> [[]] # one permutation of length 0 a.permutation(4).to_a #=> [] # no permutations of length 4
Returns first n
elements from the array.
If a negative number is given, raises an ArgumentError
.
See also Array#drop
a = [1, 2, 3, 4, 5, 0] a.take(3) #=> [1, 2, 3]
Builds a command line string from an argument list array
joining all elements escaped for the Bourne shell and separated by a space.
See Shellwords.shelljoin
for details.
Returns a Hash
containing implementation-dependent counters inside the VM.
This hash includes information about method/constant cache serials:
{ :global_method_state=>251, :global_constant_state=>481, :class_serial=>9029 }
The contents of the hash are implementation specific and may be changed in the future.
This method is only expected to work on C Ruby.