Results for: "slice"

Creates a new package that will read or write to the file gem.

True if the requirement will not always match the latest version.

Replaces this SourceList with the sources in other See << for acceptable items in other.

Normalize the list of files so that:

Checks that the specification contains all required fields, and does a very basic sanity check.

Raises InvalidSpecificationException if the spec does not pass the checks..

Does a sanity check on the specification.

Raises InvalidSpecificationException if the spec does not pass the checks.

It also performs some validations that do not raise but print warning messages instead.

Normalize the URI by adding “http://” if it is missing.

Prints a formatted backtrace to the errors stream if backtraces are enabled.

Checks the gem directory for the following potential inconsistencies/problems:

returns a hash of ErrorData objects, keyed on the problem gem’s name.

Returns the lines matched by the current scan as an array of CodeLines

Return an array of CodeLines in the document

No documentation available
No documentation available
No documentation available

Replaces self by other URI object.

Returns true if URI is hierarchical.

Description

URI has components listed in order of decreasing significance from left to right, see RFC3986 www.rfc-editor.org/rfc/rfc3986 1.2.3.

Usage

require 'uri'

uri = URI.parse("http://my.example.com/")
uri.hierarchical?
#=> true
uri = URI.parse("mailto:joe@example.com")
uri.hierarchical?
#=> false

Returns normalized URI.

require 'uri'

URI("HTTP://my.EXAMPLE.com").normalize
#=> #<URI::HTTP http://my.example.com/>

Normalization here means:

Destructive version of normalize.

Args

v

URI or String

Description

Attempts to parse other URI oth, returns [parsed_oth, self].

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.coerce("http://foo.com")
#=> [#<URI::HTTP http://foo.com>, #<URI::HTTP http://my.example.com>]

Checks if URI has a path. For URI::LDAP this will return false.

Returns a split URI against regexp[:ABS_URI].

Replaces the contents of the database with the contents of the specified object. Takes any object which implements the each_pair method, including Hash and DBM objects.

Returns:

Receive a message to the port (which was sent there by Port#send).

port = Ractor::Port.new
r = Ractor.new port do |port|
  port.send('message1')
end

v1 = port.receive
puts "Received: #{v1}"
r.join
# Here will be printed: "Received: message1"

The method blocks if the message queue is empty.

port = Ractor::Port.new
r = Ractor.new port do |port|
  wait
  puts "Still not received"
  port.send('message1')
  wait
  puts "Still received only one"
  port.send('message2')
end
puts "Before first receive"
v1 = port.receive
puts "Received: #{v1}"
v2 = port.receive
puts "Received: #{v2}"
r.join

Output:

Before first receive
Still not received
Received: message1
Still received only one
Received: message2

If close_incoming was called on the ractor, the method raises Ractor::ClosedError if there are no more messages in the message queue:

port = Ractor::Port.new
port.close
port.receive #=> raise Ractor::ClosedError

Releases the lock and sleeps timeout seconds if it is given and non-nil or forever. Raises ThreadError if mutex wasn’t locked by the current thread.

When the thread is next woken up, it will attempt to reacquire the lock.

Note that this method can wakeup without explicit Thread#wakeup call. For example, receiving signal and so on.

Returns the slept time in seconds if woken up, or nil if timed out.

Search took: 6ms  ·  Total Results: 979