Project

General

Profile

Bug #5396 ยป 0001-Improving-documentation-for-Etc-module.patch

Git-generated patch - meta (mathew murphy), 10/04/2011 05:58 AM

View differences:

ext/etc/etc.c
#endif
/*
* Returns system configuration directory.
* Returns system configuration directory. This is typically "/etc", but
* is modified by the prefix used when Ruby was compiled. For example,
* if Ruby is built and installed in /usr/local, returns "/usr/local/etc".
*/
static VALUE
etc_sysconfdir(VALUE obj)
......
}
/*
* Returns system temporary directory.
* Returns system temporary directory; typically "/tmp".
*/
static VALUE
etc_systmpdir(void)
......
}
/*
* The etc module provides access to information from the running OS.
* The etc module provides access to information typically stored in
* files in the /etc directory on Unix systems.
*
* The information accessible consists of the information found in the
* /etc/passwd and /etc/group files, plus information about the system's
* temporary directory (/tmp) and configuration directory (/etc).
*
* The Etc module provides a more reliable way to access information about
* the logged in user than environment variables such as $USER. For example:
*
* require 'etc'
*
* login = Etc::getlogin
* info = Etc::getpwnam(login)
* username = info.gecos.split(/,/).first
* puts "Hello " + username + ", I see your login name is " + login
*
* Note that the methods provided by this module are not always secure.
* It should be used for informational purposes, and not for security.
*
* Documented by mathew <meta@pobox.com>.
*/
    (1-1/1)