mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Get rid of defining methods for tests in core classes
Not to interfere in other tests.
This commit is contained in:
parent
161a20df28
commit
590dc06e38
Notes:
git
2021-01-09 22:38:31 +09:00
26 changed files with 406 additions and 392 deletions
|
@ -1,7 +1,7 @@
|
|||
#include "ruby/ruby.h"
|
||||
|
||||
static VALUE
|
||||
ary_resize(VALUE ary, VALUE len)
|
||||
ary_resize(VALUE klass, VALUE ary, VALUE len)
|
||||
{
|
||||
rb_ary_resize(ary, NUM2LONG(len));
|
||||
return ary;
|
||||
|
@ -10,5 +10,7 @@ ary_resize(VALUE ary, VALUE len)
|
|||
void
|
||||
Init_resize(void)
|
||||
{
|
||||
rb_define_method(rb_cArray, "__resize__", ary_resize, 1);
|
||||
VALUE mBug = rb_define_module("Bug");
|
||||
VALUE klass = rb_define_class_under(mBug, "Array", rb_cObject);
|
||||
rb_define_singleton_method(klass, "__resize__", ary_resize, 2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue