summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-05 20:47:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-05 20:47:01 +0000
commit56317927278dffa906092fccd1093786a9380484 (patch)
tree626ef72bc3dea1c249f99d904cb543e81a366496
parent65ea2eed78bf5f70e70885dca9be3a40e38b67d2 (diff)
* ext/-test-/array/resize/resize.c (Init_resize): renamed method
for test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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