@@ -21,6 +21,7 @@ VALUE rb_dummy_tests_rb_eval_string(VALUE self, VALUE str);
2121VALUE rb_dummy_tests_rb_eval_string_protect(VALUE self, VALUE str);
2222VALUE rb_dummy_tests_rb_ary_new(VALUE self);
2323VALUE rb_dummy_tests_rb_ary_new_capa(VALUE self, VALUE capa);
24+ VALUE rb_dummy_tests_rb_ary_push(VALUE self, VALUE ary, VALUE elem);
2425*/
2526import "C"
2627
@@ -194,6 +195,13 @@ func rb_dummy_tests_rb_ary_new_capa(_ C.VALUE, capa C.VALUE) C.VALUE {
194195 return C .VALUE (ret )
195196}
196197
198+ //export rb_dummy_tests_rb_ary_push
199+ func rb_dummy_tests_rb_ary_push (_ C.VALUE , ary C.VALUE , elem C.VALUE ) C.VALUE {
200+ ret := ruby .RbAryPush (ruby .VALUE (ary ), ruby .VALUE (elem ))
201+
202+ return C .VALUE (ret )
203+ }
204+
197205// defineMethodsToDummyTests define methods in Dummy::Tests
198206func defineMethodsToDummyTests (rb_mDummy ruby.VALUE ) {
199207 rb_cTests := ruby .RbDefineClassUnder (rb_mDummy , "Tests" , ruby .VALUE (C .rb_cObject ))
@@ -217,4 +225,5 @@ func defineMethodsToDummyTests(rb_mDummy ruby.VALUE) {
217225 ruby .RbDefineSingletonMethod (rb_cTests , "rb_eval_string_protect" , C .rb_dummy_tests_rb_eval_string_protect , 1 )
218226 ruby .RbDefineSingletonMethod (rb_cTests , "rb_ary_new" , C .rb_dummy_tests_rb_ary_new , 0 )
219227 ruby .RbDefineSingletonMethod (rb_cTests , "rb_ary_new_capa" , C .rb_dummy_tests_rb_ary_new_capa , 1 )
228+ ruby .RbDefineSingletonMethod (rb_cTests , "rb_ary_push" , C .rb_dummy_tests_rb_ary_push , 2 )
220229}
0 commit comments