Returns an array of the group IDs in the supplemental group access list for the current process:
Process.groups # => [4, 24, 27, 30, 46, 122, 135, 136, 1000]
These properties of the returned array are system-dependent:
Whether (and how) the array is sorted.
Whether the array includes effective group IDs.
Whether the array includes duplicate group IDs.
Whether the array size exceeds the value of Process.maxgroups
.
Use this call to get a sorted and unique array:
Process.groups.uniq.sort
Sets the supplemental group access list to the given array of group IDs.
Process.groups # => [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] Process.groups = [27, 6, 10, 11] # => [27, 6, 10, 11] Process.groups # => [27, 6, 10, 11]
Returns the maximum number of group IDs allowed in the supplemental group access list:
Process.maxgroups # => 32
Sets the maximum number of group IDs allowed in the supplemental group access list.
Like Enumerable#chunk
, but chains operation to be lazy-evaluated.
Iterates over the elements of the first enumerable by calling the “each” method on it with the given arguments, then proceeds to the following enumerables in sequence until all of the enumerables are exhausted.
If no block is given, returns an enumerator.
Iterates over the elements of the first enumerable by calling the “each_entry” method on it with the given arguments, then proceeds to the following enumerables in sequence until all of the enumerables are exhausted.
If no block is given, returns an enumerator. Otherwise, returns self.
Iterates for each entry in the /etc/passwd
file if a block is given.
If no block is given, returns the Enumerator
.
The code block is passed an Passwd
struct.
See Etc.getpwent
above for details.
Example:
require 'etc' Etc::Passwd.each {|u| puts u.name + " = " + u.gecos } Etc::Passwd.collect {|u| u.gecos} Etc::Passwd.collect {|u| u.gecos}
Iterates for each entry in the /etc/group
file if a block is given.
If no block is given, returns the Enumerator
.
The code block is passed a Group
struct.
Example:
require 'etc' Etc::Group.each {|g| puts g.name + ": " + g.mem.join(', ') } Etc::Group.collect {|g| g.name} Etc::Group.select {|g| !g.mem.empty?}
Get the address as an Integer
for the function named name
.
Get the address as an Integer
for the function named name
.
Returns the address as an Integer
from any handlers with the function named symbol
.
Raises a DLError
if the handle is closed.
Retrieves the section and its pairs for the current configuration.
config.each do |section, key, value| # ... end
Returns the internal Syslog
object that is initialized when the first instance is created.
Specifies the internal Syslog
object to be used.
Returns help string of OLE method. If the help string is not found, then the method returns nil.
tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser') method = WIN32OLE_METHOD.new(tobj, 'Navigate') puts method.helpstring # => Navigates to a URL or file.
Returns help string.
tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser') puts tobj.helpstring # => Web Browser interface
Inputs string
into the end of input buffer and skips data until a full flush point can be found. If the point is found in the buffer, this method flushes the buffer and returns false. Otherwise it returns true
and the following data of full flush point is preserved in the buffer.
Same as IO#sync