Results for: "to_proc"

Set the effective group ID, and if possible, the saved group ID of the process to the given group. Returns the new effective group ID. Not available on all platforms.

[Process.gid, Process.egid]          #=> [0, 0]
Process::GID.grant_privilege(31)     #=> 33
[Process.gid, Process.egid]          #=> [0, 33]

Get the group ID by the name. If the group is not found, ArgumentError will be raised.

Process::GID.from_name("wheel") #=> 0
Process::GID.from_name("nosuchgroup") #=> can't find group for nosuchgroup (ArgumentError)

Returns a proxy URI for the given scheme if one is set in the environment variables.

Re-composes a prime factorization and returns the product.

See Prime#int_from_prime_division for more details.

Returns a list of the protected instance methods defined in mod. If the optional parameter is false, the methods of any ancestors are not included.

Returns true if the named protected method is defined mod. If inherit is set, the lookup will also search mod’s ancestors. String arguments are converted to symbols.

module A
  def method1()  end
end
class B
  protected
  def method2()  end
end
class C < B
  include A
  def method3()  end
end

A.method_defined? :method1                    #=> true
C.protected_method_defined? "method1"         #=> false
C.protected_method_defined? "method2"         #=> true
C.protected_method_defined? "method2", true   #=> true
C.protected_method_defined? "method2", false  #=> false
C.method_defined? "method2"                   #=> true

Returns the size of memory allocated by malloc().

Only available if ruby was built with CALC_EXACT_MALLOC_SIZE.

No documentation available
No documentation available

returns true if self is a class which was created by HTTP::Proxy.

The address of the proxy server, if one is configured.

The port of the proxy server, if one is configured.

The username of the proxy server, if one is configured.

The password of the proxy server, if one is configured.

No documentation available
No documentation available

A recommended version for use with a ~> Requirement.

No documentation available

Return a progress reporter object chosen from the current verbosity.

Args

oth

URI or String

Description

Calculates relative path from oth to self.

Usage

require 'uri'

uri = URI.parse('http://my.example.com/main.rbx?page=1')
uri.route_from('http://my.example.com')
#=> #<URI::Generic /main.rbx?page=1>

Returns a proxy URI. The proxy URI is obtained from environment variables such as http_proxy, ftp_proxy, no_proxy, etc. If there is no proper proxy, nil is returned.

If the optional parameter env is specified, it is used instead of ENV.

Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) are examined, too.

But http_proxy and HTTP_PROXY is treated specially under CGI environment. It’s because HTTP_PROXY may be set by Proxy: header. So HTTP_PROXY is not used. http_proxy is not used too if the variable is case insensitive. CGI_HTTP_PROXY can be used instead.

No documentation available

Re-composes a prime factorization and returns the product.

Parameters

pd

Array of pairs of integers. The each internal pair consists of a prime number – a prime factor – and a natural number – an exponent.

Example

For [[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]], it returns:

p_1**e_1 * p_2**e_2 * .... * p_n**e_n.

Prime.int_from_prime_division([[2,2], [3,1]])  #=> 12
MRI specific feature

Return all reachable objects from root.

Returns true if this process is stopped. This is only returned if the corresponding wait call had the Process::WUNTRACED flag set.

Search took: 5ms  ·  Total Results: 2024