diff options
author | Benoit Daloze <[email protected]> | 2024-02-26 14:45:30 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2024-02-26 14:45:30 +0100 |
commit | 815db5c0289f5bbea2af275933ba6a4bf60a6967 () | |
tree | db319dbcc035e4248ee25c47916c6e0c1171164b /spec/ruby/optional/capi/ext | |
parent | 40c9a3dad5bc18213eb9b5ad21aa00580c12c77b (diff) |
Update to ruby/spec@3a510bb
-rw-r--r-- | spec/ruby/optional/capi/ext/encoding_spec.c | 5 | ||||
-rw-r--r-- | spec/ruby/optional/capi/ext/string_spec.c | 16 |
2 files changed, 16 insertions, 5 deletions
@@ -320,6 +320,10 @@ static VALUE encoding_spec_rb_enc_left_char_head(VALUE self, VALUE str, VALUE of return LONG2NUM(result - ptr); } void Init_encoding_spec(void) { VALUE cls; native_rb_encoding_pointer = (rb_encoding**) malloc(sizeof(rb_encoding*)); @@ -379,6 +383,7 @@ void Init_encoding_spec(void) { rb_define_method(cls, "rb_uv_to_utf8", encoding_spec_rb_uv_to_utf8, 2); rb_define_method(cls, "ONIGENC_MBC_CASE_FOLD", encoding_spec_ONIGENC_MBC_CASE_FOLD, 1); rb_define_method(cls, "rb_enc_left_char_head", encoding_spec_rb_enc_left_char_head, 2); } #ifdef __cplusplus @@ -51,10 +51,6 @@ VALUE string_spec_rb_str_set_len_RSTRING_LEN(VALUE self, VALUE str, VALUE len) { return INT2FIX(RSTRING_LEN(str)); } -VALUE string_spec_rb_str_fstring(VALUE self, VALUE str) { - return rb_str_to_interned_str(str); -} - VALUE string_spec_rb_str_buf_new(VALUE self, VALUE len, VALUE str) { VALUE buf; @@ -576,11 +572,19 @@ static VALUE string_spec_rb_str_unlocktmp(VALUE self, VALUE str) { return rb_str_unlocktmp(str); } void Init_string_spec(void) { VALUE cls = rb_define_class("CApiStringSpecs", rb_cObject); rb_define_method(cls, "rb_cstr2inum", string_spec_rb_cstr2inum, 2); rb_define_method(cls, "rb_cstr_to_inum", string_spec_rb_cstr_to_inum, 3); - rb_define_method(cls, "rb_fstring", string_spec_rb_str_fstring, 1); rb_define_method(cls, "rb_str2inum", string_spec_rb_str2inum, 2); rb_define_method(cls, "rb_str_append", string_spec_rb_str_append, 2); rb_define_method(cls, "rb_str_buf_new", string_spec_rb_str_buf_new, 2); @@ -677,6 +681,8 @@ void Init_string_spec(void) { rb_define_method(cls, "rb_str_catf", string_spec_rb_str_catf, 1); rb_define_method(cls, "rb_str_locktmp", string_spec_rb_str_locktmp, 1); rb_define_method(cls, "rb_str_unlocktmp", string_spec_rb_str_unlocktmp, 1); } #ifdef __cplusplus |