Method: String#b

Defined in:
string.c

#bString

Returns a copied string whose encoding is ASCII-8BIT.

Returns:



7600
7601
7602
7603
7604
7605
7606
7607
7608
# File 'string.c', line 7600

static VALUE
rb_str_b(VALUE str)
{
    VALUE str2 = str_alloc(rb_cString);
    str_replace_shared_without_enc(str2, str);
    OBJ_INFECT(str2, str);
    ENC_CODERANGE_SET(str2, ENC_CODERANGE_VALID);
    return str2;
}