123456789_123456789_123456789_123456789_123456789_

Top Level Namespace

Constant Summary

Class Attribute Summary

Class Method Summary

Class Attribute Details

$!(*_) (readonly)

[ GitHub ]

  
# File 'eval.c', line 1895

static VALUE
errinfo_getter(ID id, VALUE *_)
{
    return get_errinfo();
}

$$(*_y) (readonly)

[ GitHub ]

  
# File 'process.c', line 8382

static VALUE
get_PROCESS_ID(ID _x, VALUE *_y)
{
    return get_pid();
}

$&(*_y) (readonly)

[ GitHub ]

  
# File 're.c', line 1826

static VALUE
last_match_getter(ID _x, VALUE *_y)
{
    return rb_reg_last_match(rb_backref_get());
}

$'(*_y) (readonly)

[ GitHub ]

  
# File 're.c', line 1838

static VALUE
postmatch_getter(ID _x, VALUE *_y)
{
    return rb_reg_match_post(rb_backref_get());
}

$*(*var) (readonly)

[ GitHub ]

  
# File 'io.c', line 13164

static VALUE
argf_argv_getter(ID id, VALUE *var)
{
    return argf_argv(*var);
}

$+(*_y) (readonly)

[ GitHub ]

  
# File 're.c', line 1844

static VALUE
last_paren_match_getter(ID _x, VALUE *_y)
{
    return rb_reg_match_last(rb_backref_get());
}

$, (rw)

[ GitHub ]

  
# File 'io.c', line 13532

rb_define_hooked_variable("$,", &rb_output_fs, 0, deprecated_str_setter);

$-0 (rw)

Alias for $/.

[ GitHub ]

  
# File 'io.c', line 13539

rb_define_hooked_variable("$-0", &rb_rs, 0, deprecated_str_setter);

$-d(*dmy) (rw)

Alias for $DEBUG.

$-F (rw)

Alias for $;.

[ GitHub ]

  
# File 'string.c', line 11581

rb_define_hooked_variable("$-F", &rb_fs, 0, rb_fs_setter);

$-i(*var) (rw)

[ GitHub ]

  
# File 'io.c', line 13091

static VALUE
opt_i_get(ID id, VALUE *var)
{
    return argf_inplace_mode_get(*var);
}

$-K(*_y) (rw)

Alias for $KCODE.

$-v(*ptr) (rw)

Alias for $VERBOSE.

$-W(*dmy) (rw)

[ GitHub ]

  
# File 'ruby.c', line 2450

static VALUE
opt_W_getter(ID id, VALUE *dmy)
{
    VALUE v = *rb_ruby_verbose_ptr();

    switch (v) {
      case Qnil:
	return INT2FIX(0);
      case Qfalse:
	return INT2FIX(1);
      case Qtrue:
	return INT2FIX(2);
      default:
	return Qnil;
    }
}

$-w(*ptr) (rw)

Alias for $VERBOSE.

$.(*var) (rw)

[ GitHub ]

  
# File 'io.c', line 9057

static VALUE
argf_lineno_getter(ID id, VALUE *var)
{
    VALUE argf = *var;
    return INT2FIX(ARGF.last_lineno);
}

$/ (rw) Also known as: ::$-0

[ GitHub ]

  
# File 'io.c', line 13538

rb_define_hooked_variable("$/", &rb_rs, 0, deprecated_str_setter);

$0 (rw) Also known as: ::$PROGRAM_NAME

[ GitHub ]

  
# File 'ruby.c', line 2497

rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);

$; (rw) Also known as: ::$-F

[ GitHub ]

  
# File 'string.c', line 11580

rb_define_hooked_variable("$;", &rb_fs, 0, rb_fs_setter);

$< (readonly)

[ GitHub ]

  
# File 'io.c', line 13751

rb_define_readonly_variable("$<", &argf);

$=(*_y) (rw)

[ GitHub ]

  
# File 're.c', line 3933

static VALUE
ignorecase_getter(ID _x, VALUE *_y)
{
    rb_warn("variable $= is no longer effective");
    return Qfalse;
}

$>(*ptr) (rw)

Alias for $stdout.

$@(*_) (rw)

[ GitHub ]

  
# File 'eval.c', line 1930

static VALUE
errat_getter(ID id, VALUE *_)
{
    VALUE err = get_errinfo();
    if (!NIL_P(err)) {
	return rb_get_backtrace(err);
    }
    else {
	return Qnil;
    }
}

$\(*_y) (readonly) Also known as: ::$LOADED_FEATURES

[ GitHub ]

  
# File 'load.c', line 157

static VALUE
get_LOADED_FEATURES(ID _x, VALUE *_y)
{
    return get_loaded_features();
}

$\\ (rw)

[ GitHub ]

  
# File 'io.c', line 13540

rb_define_hooked_variable("$\\", &rb_output_rs, 0, deprecated_str_setter);

$_(*_y) (rw)

[ GitHub ]

  
# File 'io.c', line 13256

static VALUE
get_LAST_READ_LINE(ID _x, VALUE *_y)
{
    return rb_lastline_get();
}

$`(*_y) (readonly)

[ GitHub ]

  
# File 're.c', line 1832

static VALUE
prematch_getter(ID _x, VALUE *_y)
{
    return rb_reg_match_pre(rb_backref_get());
}

$DEBUG(*dmy) (rw) Also known as: ::$-d

[ GitHub ]

  
# File 'ruby.c', line 2467

static VALUE
debug_getter(ID id, VALUE *dmy)
{
    return *rb_ruby_debug_ptr();
}

$FILENAME(*var) (readonly)

[ GitHub ]

  
# File 'io.c', line 12924

static VALUE
argf_filename_getter(ID id, VALUE *var)
{
    return argf_filename(*var);
}

$find_time_numguess (readonly)

[ GitHub ]

  
# File 'time.c', line 3147

static VALUE find_time_numguess_getter(void)
{
    return ULL2NUM(find_time_numguess);
}

$KCODE(*_y) (rw) Also known as: ::$-K

[ GitHub ]

  
# File 're.c', line 3920

static VALUE
kcode_getter(ID _x, VALUE *_y)
{
    rb_warn("variable $KCODE is no longer effective");
    return Qnil;
}

$LOADED_FEATURES(*_y) (readonly)

Alias for $.

$PROGRAM_NAME (rw)

Alias for $0.

[ GitHub ]

  
# File 'ruby.c', line 2498

rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);

$stderr(*ptr) (rw)

[ GitHub ]

  
# File 'io.c', line 8196

static VALUE
stderr_getter(ID id, VALUE *ptr)
{
    return rb_ractor_stderr();
}

$stdin(*ptr) (rw)

[ GitHub ]

  
# File 'io.c', line 8170

static VALUE
stdin_getter(ID id, VALUE *ptr)
{
    return rb_ractor_stdin();
}

$stdout(*ptr) (rw) Also known as: ::$>

[ GitHub ]

  
# File 'io.c', line 8183

static VALUE
stdout_getter(ID id, VALUE *ptr)
{
    return rb_ractor_stdout();
}

$VERBOSE(*ptr) (rw) Also known as: ::$-v, ::$-w

! Defines built-in variables

[ GitHub ]

  
# File 'ruby.c', line 2438

static VALUE
verbose_getter(ID id, VALUE *ptr)
{
    return *rb_ruby_verbose_ptr();
}

$VERBOSE= (rw) Also known as: ::$-v=, ::$-w=

! Defines built-in variables

[ GitHub ]

  
# File 'ruby.c', line 2444

static void
verbose_setter(VALUE val, ID id, VALUE *variable)
{
    *rb_ruby_verbose_ptr() = RTEST(val) ? Qtrue : val;
}

$~(*_y) (rw)

[ GitHub ]

  
# File 're.c', line 3956

static VALUE
get_LAST_MATCH_INFO(ID _x, VALUE *_y)
{
    return match_getter();
}

Class Method Details

$?(*_y) ⇒ Boolean

The Process module is a collection of methods used to manipulate processes.

[ GitHub ]

  
# File 'process.c', line 8376

static VALUE
get_CHILD_STATUS(ID _x, VALUE *_y)
{
    return rb_last_status_get();
}