summaryrefslogtreecommitdiff
path: root/spec/ruby/optional/capi/ext/set_spec.c
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/optional/capi/ext/set_spec.c')
-rw-r--r--spec/ruby/optional/capi/ext/set_spec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/ext/set_spec.c b/spec/ruby/optional/capi/ext/set_spec.c
index 6535a11be3..11a271b361 100644
--- a/spec/ruby/optional/capi/ext/set_spec.c
+++ b/spec/ruby/optional/capi/ext/set_spec.c
@@ -1,6 +1,7 @@
#include "ruby.h"
#include "rubyspec.h"
+#ifdef RUBY_VERSION_IS_4_0
#ifdef __cplusplus
extern "C" {
#endif
@@ -46,6 +47,7 @@ VALUE set_spec_rb_set_size(VALUE self, VALUE set) {
void Init_set_spec(void) {
VALUE cls = rb_define_class("CApiSetSpecs", rb_cObject);
+
rb_define_method(cls, "rb_set_foreach", set_spec_rb_set_foreach, 2);
rb_define_method(cls, "rb_set_new", set_spec_rb_set_new, 0);
rb_define_method(cls, "rb_set_new_capa", set_spec_rb_set_new_capa, 1);
@@ -60,3 +62,4 @@ void Init_set_spec(void) {
}
#endif
+#endif