diff options
author | Andrew Konchin <[email protected]> | 2025-06-02 19:34:54 +0300 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2025-06-02 21:54:48 +0200 |
commit | d6aa1714fed3e8b5ee8bede00a8853c338ff6092 () | |
tree | ea863a44d9026f74b9a07375f401c3e5d8cb4bf5 /spec/ruby/optional/capi/ext | |
parent | 685c8ca9af892f562f64b54dbee73bb9a1999b90 (diff) |
Update to ruby/spec@4d2fc4d
Notes: Merged: https://.com/ruby/ruby/pull/13495
-rw-r--r-- | spec/ruby/optional/capi/ext/exception_spec.c | 6 | ||||
-rw-r--r-- | spec/ruby/optional/capi/ext/object_spec.c | 13 | ||||
-rw-r--r-- | spec/ruby/optional/capi/ext/string_spec.c | 1 |
3 files changed, 20 insertions, 0 deletions
@@ -36,6 +36,11 @@ VALUE exception_spec_rb_set_errinfo(VALUE self, VALUE exc) { return Qnil; } VALUE exception_spec_rb_syserr_new(VALUE self, VALUE num, VALUE msg) { int n = NUM2INT(num); char *cstr = NULL; @@ -66,6 +71,7 @@ void Init_exception_spec(void) { rb_define_method(cls, "rb_exc_new3", exception_spec_rb_exc_new3, 1); rb_define_method(cls, "rb_exc_raise", exception_spec_rb_exc_raise, 1); rb_define_method(cls, "rb_set_errinfo", exception_spec_rb_set_errinfo, 1); rb_define_method(cls, "rb_syserr_new", exception_spec_rb_syserr_new, 2); rb_define_method(cls, "rb_syserr_new_str", exception_spec_rb_syserr_new_str, 2); rb_define_method(cls, "rb_make_exception", exception_spec_rb_make_exception, 1); @@ -383,6 +383,16 @@ static VALUE object_spec_custom_alloc_func_p(VALUE self, VALUE klass) { return allocator ? Qtrue : Qfalse; } void Init_object_spec(void) { VALUE cls = rb_define_class("CApiObjectSpecs", rb_cObject); rb_define_method(cls, "FL_ABLE", object_spec_FL_ABLE, 1); @@ -455,6 +465,9 @@ void Init_object_spec(void) { rb_define_method(cls, "custom_alloc_func?", object_spec_custom_alloc_func_p, 1); rb_define_method(cls, "not_implemented_method", rb_f_notimplement, -1); rb_define_method(cls, "rb_ivar_foreach", object_spec_rb_ivar_foreach, 1); } #ifdef __cplusplus @@ -440,6 +440,7 @@ static VALUE string_spec_rb_str_free(VALUE self, VALUE str) { static VALUE string_spec_rb_sprintf1(VALUE self, VALUE str, VALUE repl) { return rb_sprintf(RSTRING_PTR(str), RSTRING_PTR(repl)); } static VALUE string_spec_rb_sprintf2(VALUE self, VALUE str, VALUE repl1, VALUE repl2) { return rb_sprintf(RSTRING_PTR(str), RSTRING_PTR(repl1), RSTRING_PTR(repl2)); } |