diff options
author | Benoit Daloze <[email protected]> | 2022-07-27 17:18:25 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2022-07-27 17:18:25 +0200 |
commit | 6582df26dcdef5dab01242b4d97d9b242e959860 () | |
tree | 99824a5c370ef27acd12905b67304870f1af9561 /spec/ruby/optional/capi/ext | |
parent | 44f42413e6c3c2b487a03b53bf6cacbb83ac285b (diff) |
Update to ruby/spec@cbfaf51
-rw-r--r-- | spec/ruby/optional/capi/ext/encoding_spec.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -120,10 +120,9 @@ static VALUE encoding_spec_rb_enc_from_index(VALUE self, VALUE index) { return rb_str_new2(rb_enc_from_index(NUM2INT(index))->name); } -static VALUE encoding_spec_rb_enc_mbc_to_codepoint(VALUE self, VALUE str, VALUE offset) { - int o = FIX2INT(offset); char *p = RSTRING_PTR(str); - char *e = p + o; return INT2FIX(rb_enc_mbc_to_codepoint(p, e, rb_enc_get(str))); } @@ -341,7 +340,7 @@ void Init_encoding_spec(void) { rb_define_method(cls, "rb_enc_isalnum", encoding_spec_rb_enc_isalnum, 2); rb_define_method(cls, "rb_enc_isspace", encoding_spec_rb_enc_isspace, 2); rb_define_method(cls, "rb_enc_from_index", encoding_spec_rb_enc_from_index, 1); - rb_define_method(cls, "rb_enc_mbc_to_codepoint", encoding_spec_rb_enc_mbc_to_codepoint, 2); rb_define_method(cls, "rb_enc_mbcput", encoding_spec_rb_enc_mbcput, 2); rb_define_method(cls, "rb_enc_from_encoding", encoding_spec_rb_enc_from_encoding, 1); rb_define_method(cls, "rb_enc_get", encoding_spec_rb_enc_get, 1); |