1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[DOC] Fixed ENV.rassoc result order [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2020-02-20 08:43:26 +09:00
parent eed7235e33
commit 036a68ae2c
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

5
hash.c
View file

@ -6037,8 +6037,9 @@ env_has_value(VALUE dmy, VALUE obj)
* call-seq:
* ENV.rassoc(value)
*
* Returns a 2-element Array containing the value and name of the *first* *found* environment variable
* that has value +value+, if one exists:
* Returns a 2-element Array containing the name and value of the
* *first* *found* environment variable that has value +value+, if one
* exists:
* ENV.replace('foo' => '0', 'bar' => '0')
* ENV.rassoc('0') # => ["bar", "0"]
* The order in which environment variables are examined is OS-dependent.