diff options
author | Burdette Lamar <BurdetteLamar@Yahoo.com> | 2019-11-04 17:03:01 -0600 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-05 08:03:01 +0900 |
commit | 74bb8fb3480d0b0acaa6ef0bb93cc990cc7bf639 (patch) | |
tree | 0d3edbed8e943b0e2fa68e00397b182c5216d271 /hash.c | |
parent | 9d04fa71fcd5352aadcdff43636ee915666bf749 (diff) | |
download | ruby-74bb8fb3480d0b0acaa6ef0bb93cc990cc7bf639.tar.gz |
More rdoc for ENV
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -6214,6 +6214,34 @@ Init_Hash(void) /* Document-class: ENV * * ENV is a hash-like accessor for environment variables. + * + * === Interaction with the Operating System + * The ENV object interacts with the operating system's environment variables: + * - When you get the value for a name in ENV, the value is retrieved from among the current environment variables. + * - When you create or set a name-value pair in ENV, the name and value are immediately set in the environment variables. + * - When you delete a name-value pair in ENV, it is immediately deleted from the environment variables. + * === Names and Values + * Generally speaking, each name or value is a String. + * + * Strictly speaking: + * - Each name or value must be one of the following: + * - A String. + * - An object that responds to #to_str by returning a String, which will be used as the name or value. + * - A name may not: + * - Be the empty string. + * - Contain character <code>=</code> or the NUL character (<code>"\0"</code>). + * - Have an ASCII-incompatible encoding (e.g., UTF-16LE, ISO-2022-JP). + + * === About Ordering + * ENV presents its content in the order found + * in the operating system's environment variables. + * Therefore the ordering of ENV content is OS-dependent, and may be indeterminate. + * + * This will be seen in: + * - A Hash returned by an ENV method. + * - An Enumerator returned by an ENV method. + * - An Array returned by ENV.keys, ENV.values, or ENV.to_a. + * - The String returned by ENV.inspect. */ /* |