Document defined? and global_variables handling of regexp global variables [ci skip]

Fixes [Bug #11304]
This commit is contained in:
Jeremy Evans 2020-03-06 13:03:58 -08:00
parent c3584dfacc
commit f991340e07
2 changed files with 34 additions and 1 deletions

5
eval.c
View file

@ -1996,7 +1996,10 @@ f_current_dirname(VALUE _)
* call-seq:
* global_variables -> array
*
* Returns an array of the names of global variables.
* Returns an array of the names of global variables. This includes
* special regexp global variables such as <tt>$~</tt> and <tt>$+</tt>,
* but does not include the numbered regexp global variables (<tt>$1</tt>,
* <tt>$2</tt>, etc.).
*
* global_variables.grep /std/ #=> [:$stdin, :$stdout, :$stderr]
*/