1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-11-30 21:26:52 +01:00
parent ab8345271e
commit 1243255c3a
174 changed files with 1780 additions and 426 deletions

View file

@ -411,6 +411,18 @@ static VALUE string_spec_rb_str_modify(VALUE self, VALUE str) {
return str;
}
static VALUE string_spec_rb_utf8_str_new_static(VALUE self) {
return rb_utf8_str_new_static("nokogiri", 8);
}
static VALUE string_spec_rb_utf8_str_new(VALUE self) {
return rb_utf8_str_new("nokogiri", 8);
}
static VALUE string_spec_rb_utf8_str_new_cstr(VALUE self) {
return rb_utf8_str_new_cstr("nokogiri");
}
void Init_string_spec(void) {
VALUE cls = rb_define_class("CApiStringSpecs", rb_cObject);
rb_define_method(cls, "rb_cstr2inum", string_spec_rb_cstr2inum, 2);
@ -485,6 +497,9 @@ void Init_string_spec(void) {
rb_define_method(cls, "rb_String", string_spec_rb_String, 1);
rb_define_method(cls, "rb_string_value_cstr", string_spec_rb_string_value_cstr, 1);
rb_define_method(cls, "rb_str_modify", string_spec_rb_str_modify, 1);
rb_define_method(cls, "rb_utf8_str_new_static", string_spec_rb_utf8_str_new_static, 0);
rb_define_method(cls, "rb_utf8_str_new", string_spec_rb_utf8_str_new, 0);
rb_define_method(cls, "rb_utf8_str_new_cstr", string_spec_rb_utf8_str_new_cstr, 0);
}
#ifdef __cplusplus