Method: Kernel#global_variables
- Defined in:
- eval.c
#global_variables ⇒ Array
Returns an array of the names of global variables. This includes special regexp global variables such as $~
and $+
, but does not include the numbered regexp global variables ($1
, $2
, etc.).
global_variables.grep /std/ #=> [:$stdin, :$stdout, :$stderr]
2055 2056 2057 2058 2059 |
# File 'eval.c', line 2055 static VALUE f_global_variables(VALUE _) { return rb_f_global_variables(); } |