summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-04 11:46:49 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-04 11:46:49 +0000
commit2c62b3fbc7315942d9f462195020ab681c3a4c0d (patch)
tree8458f23ee28170453fa26775a3f05c2967b04e3f /hash.c
parent7633552b1d5cdb7e3a06b86e933c7b01079f5e58 (diff)
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
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 8602682..4766cf2 100644
--- a/hash.c
+++ b/hash.c
@@ -5086,10 +5086,14 @@ env_values_at(int argc, VALUE *argv)
* call-seq:
* ENV.select { |name, value| block } -> Hash
* 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 an Enumerator if no block was given.
+ *
+ * ENV.filter is an alias for ENV.select.
*/
static VALUE
env_select(VALUE ehash)
@@ -5119,8 +5123,12 @@ env_select(VALUE ehash)
* call-seq:
* ENV.select! { |name, value| block } -> ENV or nil
* 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.
+ *
+ * ENV.filter! is an alias for ENV.select!.
*/
static VALUE
env_select_bang(VALUE ehash)