4 VALUE
concat_func(VALUE args
) {
6 char buffer
[500] = {0};
7 for(i
= 0; i
< RARRAY(args
)->len
; ++i
) {
8 VALUE v
= RARRAY(args
)->ptr
[i
];
9 strcat(buffer
, STR2CSTR(v
));
12 buffer
[strlen(buffer
) - 1] = 0;
13 return rb_str_new2(buffer
);
17 VALUE
sp_underline_concat_proc(VALUE self
) {
18 return rb_proc_new(concat_func
, Qnil
);
21 void Init_subtend_proc() {
23 cls
= rb_define_class("SubtendProc", rb_cObject
);
25 rb_define_method(cls
, "underline_concat_proc", sp_underline_concat_proc
, 0);