Version of the gem
The Requirement of the unresolved dependency (not Version).
Concatenates the new
requirements onto this requirement.
A string representation of this Version
.
Extensions to build when installing the gem, specifically the paths to extconf.rb-style files used to compile extensions.
These files will be run when the gem is installed, causing the C (or whatever) code to be compiled on the user’s machine.
Usage:
spec.extensions << 'ext/rmagic/extconf.rb'
See Gem::Ext::Builder
for information about writing extensions for gems.
Activate this spec, registering it as a loaded spec and adding it’s lib paths to $LOAD_PATH. Returns true if the spec was activated, false if it was previously activated. Freaks out if there are conflicts upon activation.
Return any possible conflicts against the currently loaded specs.
Sets extensions to extensions
, ensuring it is an array. Don’t use this, push onto the array instead.
Set
the version to version
, potentially also setting required_rubygems_version
if version
indicates it is a prerelease.
Returns a Concat
object, for the given jobs
returns extensions.
setter for extensions val
Obtains a lock, runs the block, and releases the lock when the block completes. See the example under Mutex
.
Returns collection of supported maker versions
Returns the factorization of self
.
See Prime#prime_division
for more details.
Returns an address of the socket suitable for connect in the local machine.
This method returns self.local_address, except following condition.
IPv4 unspecified address (0.0.0.0) is replaced by IPv4 loopback address (127.0.0.1).
IPv6 unspecified address (::) is replaced by IPv6 loopback address (::1).
If the local address is not suitable for connect, SocketError
is raised. IPv4 and IPv6 address which port is 0 is not suitable for connect. Unix domain socket which has no path is not suitable for connect.
Addrinfo.tcp("0.0.0.0", 0).listen {|serv| p serv.connect_address #=> #<Addrinfo: 127.0.0.1:53660 TCP> serv.connect_address.connect {|c| s, _ = serv.accept p [c, s] #=> [#<Socket:fd 4>, #<Socket:fd 6>] } }
creates a new Socket
connected to the address of local_addrinfo
.
If local_addrinfo is nil, the address of the socket is not bound.
The timeout specify the seconds for timeout. Errno::ETIMEDOUT is raised when timeout occur.
If a block is given the created socket is yielded for each address.
creates a socket connected to the address of self.
If one or more arguments given as local_addr_args, it is used as the local address of the socket. local_addr_args is given for family_addrinfo
to obtain actual address.
If local_addr_args is not given, the local address of the socket is not bound.
The optional last argument opts is options represented by a hash. opts may have following options:
specify the timeout in seconds.
If a block is given, it is called with the socket and the value of the block is returned. The socket is returned otherwise.
Addrinfo.tcp("www.ruby-lang.org", 80).connect_from("0.0.0.0", 4649) {|s| s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" puts s.read } # Addrinfo object can be taken for the argument. Addrinfo.tcp("www.ruby-lang.org", 80).connect_from(Addrinfo.tcp("0.0.0.0", 4649)) {|s| s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" puts s.read }