Gem::Resolver::Molinillo
is a generic dependency resolution algorithm.
Raised if the tar IO
is not seekable
IO
wrapper that allows writing a limited amount of data
Removes duplicate elements from self
.
If a block is given, it will use the return value of the block for comparison.
It compares values using their hash
and eql?
methods for efficiency.
self
is traversed in order, and the first occurrence is kept.
Returns nil
if no changes are made (that is, no duplicates are found).
a = [ "a", "a", "b", "b", "c" ] a.uniq! # => ["a", "b", "c"] b = [ "a", "b", "c" ] b.uniq! # => nil c = [["student","sam"], ["student","george"], ["teacher","matz"]] c.uniq! {|s| s.first} # => [["student", "sam"], ["teacher", "matz"]]
Returns true for IPv6 unique local address (fc00::/7, RFC4193). It returns false otherwise.
Returns the unique-id of the message. Normally the unique-id is a hash string of the message.
This method raises a POPError
if an error occurs.
Set
Union — Returns a new array by joining other_ary
s with self
, excluding any duplicates and preserving the order from the given arrays.
It compares elements using their hash
and eql?
methods for efficiency.
[ "a", "b", "c" ].union( [ "c", "d", "a" ] ) #=> [ "a", "b", "c", "d" ] [ "a" ].union( ["e", "b"], ["a", "c", "b"] ) #=> [ "a", "e", "b", "c" ] [ "a" ].union #=> [ "a" ]
See also Array#|
.
Return a Regexp
object that is the union of the given patterns, i.e., will match any of its parts. The patterns can be Regexp
objects, in which case their options will be preserved, or Strings. If no patterns are given, returns /(?!)/
. The behavior is unspecified if any given pattern contains capture.
Regexp.union #=> /(?!)/ Regexp.union("penzance") #=> /penzance/ Regexp.union("a+b*c") #=> /a\+b\*c/ Regexp.union("skiing", "sledding") #=> /skiing|sledding/ Regexp.union(["skiing", "sledding"]) #=> /skiing|sledding/ Regexp.union(/dogs/, /cats/i) #=> /(?-mix:dogs)|(?i-mx:cats)/
Note: the arguments for ::union
will try to be converted into a regular expression literal via to_regexp.