Project

General

Profile

Bug #14150 » str_new_funcs.c

kubo (Takehiro Kubo), 12/02/2017 02:11 AM

 
#include <ruby.h>
#include <ruby/encoding.h>

void Init_str_new_funcs()
{
fprintf(stderr, "call rb_str_new(NULL, 0)\n");
rb_str_new(NULL, 0);

fprintf(stderr, "call rb_external_str(NULL, 0)\n");
rb_external_str_new(NULL, 0);

fprintf(stderr, "call rb_locale_str_new(NULL, 0)\n");
rb_locale_str_new(NULL, 0);

fprintf(stderr, "call rb_usascii_str_new(NULL, 0)\n");
rb_usascii_str_new(NULL, 0);

fprintf(stderr, "call rb_utf8_str_new(NULL, 0)\n");
rb_utf8_str_new(NULL, 0);

fprintf(stderr, "call rb_enc_str_new(NULL, 0 rb_usascii_encoding()\n");
rb_enc_str_new(NULL, 0, rb_usascii_encoding());

fprintf(stderr, "call rb_external_str_new_with_enc(NULL, 0, rb_usascii_encoding())\n");
rb_external_str_new_with_enc(NULL, 0, rb_usascii_encoding());

fprintf(stderr, "all okay!\n");
}
(2-2/2)