summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/-test-/array/resize/resize.c2
-rw-r--r--test/-ext-/array/test_resize.rb12
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/-test-/array/resize/resize.c b/ext/-test-/array/resize/resize.c
index b3e6c751ba1..08bcee3e7a2 100644
--- a/ext/-test-/array/resize/resize.c
+++ b/ext/-test-/array/resize/resize.c
@@ -10,5 +10,5 @@ ary_resize(VALUE ary, VALUE len)
void
Init_resize(void)
{
- rb_define_method(rb_cArray, "resize", ary_resize, 1);
+ rb_define_method(rb_cArray, "__resize__", ary_resize, 1);
}
diff --git a/test/-ext-/array/test_resize.rb b/test/-ext-/array/test_resize.rb
index d9084b652da..8e526b5a0c4 100644
--- a/test/-ext-/array/test_resize.rb
+++ b/test/-ext-/array/test_resize.rb
@@ -6,22 +6,22 @@ class TestArray < Test::Unit::TestCase
def test_expand
feature = '[ruby-dev:42912]'
ary = [*1..10]
- ary.resize(10)
+ ary.__resize__(10)
assert_equal(10, ary.size, feature)
assert_equal([*1..10], ary, feature)
- ary.resize(100)
+ ary.__resize__(100)
assert_equal(100, ary.size, feature)
assert_equal([*1..10]+[nil]*90, ary, feature)
- ary.resize(20)
+ ary.__resize__(20)
assert_equal(20, ary.size, feature)
assert_equal([*1..10]+[nil]*10, ary, feature)
- ary.resize(2)
+ ary.__resize__(2)
assert_equal(2, ary.size, feature)
assert_equal([1,2], ary, feature)
- ary.resize(3)
+ ary.__resize__(3)
assert_equal(3, ary.size, feature)
assert_equal([1,2,nil], ary, feature)
- ary.resize(10)
+ ary.__resize__(10)
assert_equal(10, ary.size, feature)
assert_equal([1,2]+[nil]*8, ary, feature)
end