Method: Warning#warn

Defined in:
error.c

#warn(msg) ⇒ nil

Writes warning message msg to $stderr. This method is called by Ruby for all emitted warnings.

Returns:

  • (nil)


224
225
226
227
228
229
230
231
# File 'error.c', line 224

static VALUE
rb_warning_s_warn(VALUE mod, VALUE str)
{
    Check_Type(str, T_STRING);
    rb_must_asciicompat(str);
    rb_write_error_str(str);
    return Qnil;
}