summaryrefslogtreecommitdiff
path: root/spec/ruby/optional/capi/ext
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2022-09-28 18:37:17 +0200
committerBenoit Daloze <[email protected]>2022-09-28 18:37:17 +0200
commit31cf1bb5256314b69eae92673d3dd5815158ee91 ()
tree5ee049f751426794bfe47d0fa847f5621d3a039d /spec/ruby/optional/capi/ext
parent5a1ab740fc287df8bf4038f19bd28bbb73e181b6 (diff)
Update to ruby/spec@1d9d5c6
-rw-r--r--spec/ruby/optional/capi/ext/kernel_spec.c5
-rw-r--r--spec/ruby/optional/capi/ext/object_spec.c13
2 files changed, 18 insertions, 0 deletions
@@ -112,6 +112,10 @@ VALUE kernel_spec_rb_eval_string(VALUE self, VALUE str) {
return rb_eval_string(RSTRING_PTR(str));
}
VALUE kernel_spec_rb_raise(VALUE self, VALUE hash) {
rb_hash_aset(hash, ID2SYM(rb_intern("stage")), ID2SYM(rb_intern("before")));
if (self != Qundef)
@@ -361,6 +365,7 @@ void Init_kernel_spec(void) {
rb_define_method(cls, "rb_frame_this_func_test_again", kernel_spec_rb_frame_this_func, 0);
rb_define_method(cls, "rb_ensure", kernel_spec_rb_ensure, 4);
rb_define_method(cls, "rb_eval_string", kernel_spec_rb_eval_string, 1);
rb_define_method(cls, "rb_raise", kernel_spec_rb_raise, 1);
rb_define_method(cls, "rb_throw", kernel_spec_rb_throw, 1);
rb_define_method(cls, "rb_throw_obj", kernel_spec_rb_throw_obj, 2);
@@ -393,6 +393,18 @@ static VALUE object_spec_rb_class_inherited_p(VALUE self, VALUE mod, VALUE arg)
return rb_class_inherited_p(mod, arg);
}
static VALUE speced_allocator(VALUE klass) {
VALUE flags = 0;
VALUE instance;
@@ -508,6 +520,7 @@ void Init_object_spec(void) {
rb_define_method(cls, "speced_allocator?", speced_allocator_p, 1);
rb_define_method(cls, "custom_alloc_func?", custom_alloc_func_p, 1);
rb_define_method(cls, "not_implemented_method", rb_f_notimplement, -1);
}
#ifdef __cplusplus