diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-06-27 15:51:37 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-06-27 15:51:37 +0200 |
commit | b3fa158d1c4d8e03b8dc04f1e4f9940a8a4ef44c (patch) | |
tree | fa8a62d6192c24a21e70aa02589507adfe4e4e6a /spec/ruby/optional/capi/ext/array_spec.c | |
parent | 64d8c0815e6ab042e8a67a670bda9f34404fa662 (diff) | |
download | ruby-b3fa158d1c4d8e03b8dc04f1e4f9940a8a4ef44c.tar.gz |
Update to ruby/spec@b6b7752
Diffstat (limited to 'spec/ruby/optional/capi/ext/array_spec.c')
-rw-r--r-- | spec/ruby/optional/capi/ext/array_spec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/ext/array_spec.c b/spec/ruby/optional/capi/ext/array_spec.c index afd6aeef15..39ed1ed18b 100644 --- a/spec/ruby/optional/capi/ext/array_spec.c +++ b/spec/ruby/optional/capi/ext/array_spec.c @@ -162,6 +162,14 @@ static VALUE array_spec_rb_ary_shift(VALUE self, VALUE array) { return rb_ary_shift(array); } +static VALUE array_spec_rb_ary_sort(VALUE self, VALUE array) { + return rb_ary_sort(array); +} + +static VALUE array_spec_rb_ary_sort_bang(VALUE self, VALUE array) { + return rb_ary_sort_bang(array); +} + static VALUE array_spec_rb_ary_store(VALUE self, VALUE array, VALUE offset, VALUE value) { rb_ary_store(array, FIX2INT(offset), value); @@ -272,6 +280,8 @@ void Init_array_spec(void) { rb_define_method(cls, "rb_ary_reverse", array_spec_rb_ary_reverse, 1); rb_define_method(cls, "rb_ary_rotate", array_spec_rb_ary_rotate, 2); rb_define_method(cls, "rb_ary_shift", array_spec_rb_ary_shift, 1); + rb_define_method(cls, "rb_ary_sort", array_spec_rb_ary_sort, 1); + rb_define_method(cls, "rb_ary_sort_bang", array_spec_rb_ary_sort_bang, 1); rb_define_method(cls, "rb_ary_store", array_spec_rb_ary_store, 3); rb_define_method(cls, "rb_ary_concat", array_spec_rb_ary_concat, 2); rb_define_method(cls, "rb_ary_plus", array_spec_rb_ary_plus, 2); |