Returns the full path for a WS
URI
, 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:
uri = URI::WS.build(path: '/foo/bar', query: 'test=true') uri.request_uri # => "/foo/bar?test=true"
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.
Create a new EnsureNode
node.
Create a new StatementsNode
node.
Creates a new digest instance using the specified algorithm
. The default is SHA256.
Invokes system, but silences all output.
Discard statistics collected for --yjit-stats
.
Dispatch enter and leave events for EmbeddedStatementsNode
nodes and continue walking the tree.
Dispatch enter and leave events for RegularExpressionNode
nodes and continue walking the tree.
Save the ensure_keyword_loc
location using the given saved source so that it can be retrieved later.
Create a new InterpolatedRegularExpressionNode
node.
Mirrors the C extension’s StringQuery::constant?
method.
Whether or not this string is a valid constant name.