blob: b3e6c751ba1cc50e56e22519c72349a8fd80692a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include "ruby/ruby.h"
static VALUE
ary_resize(VALUE ary, VALUE len)
{
rb_ary_resize(ary, NUM2LONG(len));
return ary;
}
void
Init_resize(void)
{
rb_define_method(rb_cArray, "resize", ary_resize, 1);
}
|