On Sun, 18 Feb 2001, David Alan Black wrote:
> rb_str_append(str1, str2)
In Init_String, it has:
rb_define_method(rb_cString, "<<", rb_str_concat, 1);
so I don't think rb_str_append is the one being called to append to a
string, regardless of the name.
VALUE
rb_str_concat(str1, str2)
VALUE str1, str2;
{
if (FIXNUM_P(str2)) {
int i = FIX2INT(str2);
if (0 <= i && i <= 0xff) { /* byte */
char c = i;
return rb_str_cat(str1, &c, 1);
}
}
str1 = rb_str_append(str1, str2);
return str1;
}
implements the observed behaviour.
I can't find any rb_define_method for rb_str_append, so it's probably an
internal method only.
--
spwhite / chariot.net.au