Is this platform FreeBSD
Copies IO stream src
to IO stream dest
via IO.copy_stream
.
Related: methods for copying.
Copies IO stream src
to IO stream dest
via IO.copy_stream
.
Related: methods for copying.
Creats temporary source file from COMMON_HEADERS
and src. Yields the created source string and uses the returned string as the source code, if the block is given.
Registers the given klass
as the class to be instantiated when parsing a URI with the given scheme
:
URI.register_scheme('MS_SEARCH', URI::Generic) # => URI::Generic URI.scheme_list['MS_SEARCH'] # => URI::Generic
Note that after calling String#upcase
on scheme
, it must be a valid constant name.
Mirror the Prism.parse_stream
API by using the serialization API.
SyntaxSuggest.record_dir
[Private]
Used to generate a unique directory to record search steps for debugging
Returns a Process::Status
object representing the most recently exited child process in the current thread, or nil
if none:
Process.spawn('ruby', '-e', 'exit 13') Process.wait Process.last_status # => #<Process::Status: pid 14396 exit 13> Process.spawn('ruby', '-e', 'exit 14') Process.wait Process.last_status # => #<Process::Status: pid 4692 exit 14> Process.spawn('ruby', '-e', 'exit 15') # 'exit 15' has not been reaped by #wait. Process.last_status # => #<Process::Status: pid 4692 exit 14> Process.wait Process.last_status # => #<Process::Status: pid 1380 exit 15>
Is this handler a streaming handler?
Sends the given request req
to the server; forms the response into a Net::HTTPResponse
object.
The given req
must be an instance of a subclass of Net::HTTPRequest. Argument body
should be given only if needed for the request.
With no block given, returns the response object:
http = Net::HTTP.new(hostname) req = Net::HTTP::Get.new('/todos/1') http.request(req) # => #<Net::HTTPOK 200 OK readbody=true> req = Net::HTTP::Post.new('/todos') http.request(req, 'xyzzy') # => #<Net::HTTPCreated 201 Created readbody=true>
With a block given, calls the block with the response and returns the response:
req = Net::HTTP::Get.new('/todos/1') http.request(req) do |res| p res end # => #<Net::HTTPOK 200 OK readbody=true>
Output:
#<Net::HTTPOK 200 OK readbody=false>