Similar to store()
, but set
contains unique identifiers.
Returns the full path for an HTTP
request, as required by Net::HTTP::Get
.
If the URI
contains a query, the full path is URI#path + ‘?’ + URI#query. Otherwise, the path is simply URI#path.
Example:
newuri = URI::HTTP.build(path: '/foo/bar', query: 'test=true') newuri.request_uri # => "/foo/bar?test=true"
Inserts an child before another child @param child1 this is either an xpath or an Element
. If an Element
, child2 will be inserted before child1 in the child list of the parent. If an xpath, child2 will be inserted before the first child to match the xpath. @param child2 the child to insert @return the parent (self)
register uri against this name.
Count the number of gemspecs in the list specs
that are not in ignored
.
Compresses indices on disk
Ensure that the dependency is satisfied by the current installation of gem. If it is not an exception is raised.
Sets the rubygems_version
to the current RubyGems version.
Constructs a Gem::Resolver::DependencyRequest
from a Gem::Dependency
dep
, a from_name
and from_version
requesting the dependency and a parent
DependencyRequest
Similar to read, but raises EOFError
at end of string unless the +exception: false+ option is passed in.
Reads at most maxlen bytes in the non-blocking manner.
When no data can be read without blocking it raises OpenSSL::SSL::SSLError
extended by IO::WaitReadable
or IO::WaitWritable
.
IO::WaitReadable
means SSL
needs to read internally so read_nonblock
should be called again when the underlying IO
is readable.
IO::WaitWritable
means SSL
needs to write internally so read_nonblock
should be called again after the underlying IO
is writable.
OpenSSL::Buffering#read_nonblock
needs two rescue clause as follows:
# emulates blocking read (readpartial). begin result = ssl.read_nonblock(maxlen) rescue IO::WaitReadable IO.select([io]) retry rescue IO::WaitWritable IO.select(nil, [io]) retry end
Note that one reason that read_nonblock
writes to the underlying IO
is when the peer requests a new TLS/SSL handshake. See openssl the FAQ for more details. www.openssl.org/support/faq.html
By specifying a keyword argument exception to false
, you can indicate that read_nonblock
should not raise an IO::Wait*able exception, but return the symbol :wait_writable
or :wait_readable
instead. At EOF, it will return nil
instead of raising EOFError
.
returns a Time
that represents the Last-Modified field.
Kouhei fixed this
Invokes system, but silences all output.
Returns the description corresponding to the HTTP status code
WEBrick::HTTPStatus.reason_phrase 404 => "Not Found"