mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
hash.c: [DOC] add docs for ENV.{filter,filter!}
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7633552b1d
commit
2c62b3fbc7
1 changed files with 8 additions and 0 deletions
8
hash.c
8
hash.c
|
@ -5086,10 +5086,14 @@ env_values_at(int argc, VALUE *argv)
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* ENV.select { |name, value| block } -> Hash
|
* ENV.select { |name, value| block } -> Hash
|
||||||
* ENV.select -> Enumerator
|
* ENV.select -> Enumerator
|
||||||
|
* ENV.filter { |name, value| block } -> Hash
|
||||||
|
* ENV.filter -> Enumerator
|
||||||
*
|
*
|
||||||
* Returns a copy of the environment for entries where the block returns true.
|
* Returns a copy of the environment for entries where the block returns true.
|
||||||
*
|
*
|
||||||
* Returns an Enumerator if no block was given.
|
* Returns an Enumerator if no block was given.
|
||||||
|
*
|
||||||
|
* ENV.filter is an alias for ENV.select.
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
env_select(VALUE ehash)
|
env_select(VALUE ehash)
|
||||||
|
@ -5119,8 +5123,12 @@ env_select(VALUE ehash)
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* ENV.select! { |name, value| block } -> ENV or nil
|
* ENV.select! { |name, value| block } -> ENV or nil
|
||||||
* ENV.select! -> Enumerator
|
* ENV.select! -> Enumerator
|
||||||
|
* ENV.filter! { |name, value| block } -> ENV or nil
|
||||||
|
* ENV.filter! -> Enumerator
|
||||||
*
|
*
|
||||||
* Equivalent to ENV.keep_if but returns +nil+ if no changes were made.
|
* Equivalent to ENV.keep_if but returns +nil+ if no changes were made.
|
||||||
|
*
|
||||||
|
* ENV.filter! is an alias for ENV.select!.
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
env_select_bang(VALUE ehash)
|
env_select_bang(VALUE ehash)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue