Called before each event with line/column information.
This method is called when a parse error is found.
ERROR_TOKEN_ID is an internal ID of token which caused error. You can get string representation of this ID by calling token_to_str
.
ERROR_VALUE is a value of error token.
value_stack is a stack of symbol values. DO NOT MODIFY this object.
This method raises ParseError
by default.
If this method returns, parsers enter “error recovering mode”.
See Zlib::GzipReader
documentation for a description.
Returns true
if this is a header row.
Stop this server.
The main loop performed by a DRbServer’s internal thread.
Accepts a connection from a client, and starts up its own thread to handle it. This thread loops, receiving requests from the client, invoking them on a local object, and returning responses, until the client closes the connection or a local method call fails.
Returns the eigenvector matrix V
Returns the block diagonal eigenvalue matrix D
Returns true if net/http is in version 1.2 mode. Defaults to true.
Gets the body text from the target and outputs it to $stdout. The target can either be specified as (uri
), or as (host
, path
, port
= 80); so:
Net::HTTP.get_print URI('http://www.example.com/index.html')
or:
Net::HTTP.get_print 'www.example.com', '/index.html'
Sends a GET request to the target and returns the HTTP
response as a Net::HTTPResponse
object. The target can either be specified as (uri
), or as (host
, path
, port
= 80); so:
res = Net::HTTP.get_response(URI('http://www.example.com/index.html')) print res.body
or:
res = Net::HTTP.get_response('www.example.com', '/index.html') print res.body
The username of the proxy server, if one is configured.
Sends a GET request to the path
. Returns the response as a Net::HTTPResponse
object.
When called with a block, passes an HTTPResponse
object to the block. The body of the response will not have been read yet; the block can process it using HTTPResponse#read_body
, if desired.
Returns the response.
This method never raises Net::* exceptions.
response = http.request_get('/index.html') # The entity body is already read in this case. p response['content-type'] puts response.body # Using a block http.request_get('/index.html') {|response| p response['content-type'] response.read_body do |str| # read body now print str end }
true if the response has a body.