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.
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.
creates a new socket connected to path using UNIX socket socket.
If a block is given, the block is called with the socket. The value of the block is returned. The socket is closed when this method returns.
If no block is given, the socket is returned.
# talk to /tmp/sock socket. Socket.unix("/tmp/sock") {|sock| t = Thread.new { IO.copy_stream(sock, STDOUT) } IO.copy_stream(STDIN, sock) t.join }
returns an addrinfo object for UNIX socket address.
socktype specifies the socket type. If it is omitted, :STREAM is used.
Addrinfo.unix("/tmp/sock") #=> #<Addrinfo: /tmp/sock SOCK_STREAM> Addrinfo.unix("/tmp/sock", :DGRAM) #=> #<Addrinfo: /tmp/sock SOCK_DGRAM>
returns true if addrinfo is UNIX address. returns false otherwise.
Addrinfo.tcp("127.0.0.1", 80).unix? #=> false Addrinfo.tcp("::1", 80).unix? #=> false Addrinfo.unix("/tmp/sock").unix? #=> true
Returns true
if this is a unitary matrix Raises an error if matrix is not square.