Returns the first source in the list.
Returns a Gem::StubSpecification
for every installed gem
Recursively walk dependencies of this spec, executing the block
for each hop.
Performs the uninstall of the gem. This removes the spec, the Gem
directory, and the cached .gem file.
Prints a formatted backtrace to the errors stream if backtraces are enabled.
Sets userinfo, argument is string like ‘name:pass’.
Returns the userinfo, either as ‘user’ or ‘user:password’.
v
Public setter for the host component v
(with validation).
See also URI::Generic.check_host
.
require 'uri' uri = URI.parse("http://my.example.com") uri.host = "foo.com" uri.to_s #=> "http://foo.com"
Extract the host part of the URI
and unwrap brackets for IPv6 addresses.
This method is the same as URI::Generic#host
except brackets for IPv6 (and future IP) addresses are removed.
uri = URI("http://[::1]/bar") uri.hostname #=> "::1" uri.host #=> "[::1]"
Sets the host part of the URI
as the argument with brackets for IPv6 addresses.
This method is the same as URI::Generic#host=
except the argument can be a bare IPv6 address.
uri = URI("http://foo/bar") uri.hostname = "::1" uri.to_s #=> "http://[::1]/bar"
If the argument seems to be an IPv6 address, it is wrapped with brackets.
str
String
to search
schemes
Patterns to apply to str
Attempts to parse and merge a set of URIs. If no block
given, then returns the result, else it calls block
for each element in result.
See also URI::Parser.make_regexp
.
str
String
to search
schemes
Patterns to apply to str
Attempts to parse and merge a set of URIs. If no block
given, then returns the result, else it calls block
for each element in result.
See also URI::Parser.make_regexp
.
Stores value
in database with key
as the index. value
is converted to YAML
before being stored.
Returns value
Returns true
if this process is stopped. This is only returned if the corresponding wait call had the Process::WUNTRACED flag set.
Returns the number of the signal that caused stat to stop (or nil
if self is not stopped).
Returns the least significant eight bits of the return code of stat. Only available if exited?
is true
.
fork { } #=> 26572 Process.wait #=> 26572 $?.exited? #=> true $?.exitstatus #=> 0 fork { exit 99 } #=> 26573 Process.wait #=> 26573 $?.exited? #=> true $?.exitstatus #=> 99
Wakes up all threads waiting for this lock.
Returns URL-escaped string following RFC 3986.
Returns URL-unescaped string following RFC 3986.
URL-encode a string following RFC 3986 Space characters (+“ ”+) are encoded with (+“%20”+)
url_encoded_string = CGI.escape("'Stop!' said Fred") # => "%27Stop%21%27%20said%20Fred"