summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-10-21 16:24:29 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2022-10-21 14:57:34 -0700
commita11952dac1a5b0776a493968eeffbd4be4403b76 (patch)
treeb905121c4e4ac94010def14957da6539ce0dd2d5 /test
parent13bd617ea6fdf72467c593639cf33312a06c330c (diff)
Rename `iv_count` on shapes to `next_iv_index`
`iv_count` is a misleading name because when IVs are unset, the new shape doesn't decrement this value. `next_iv_count` is an accurate, and more descriptive name.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6608
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_shapes.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_shapes.rb b/test/ruby/test_shapes.rb
index 0f947bcd47..23696acc70 100644
--- a/test/ruby/test_shapes.rb
+++ b/test/ruby/test_shapes.rb
@@ -65,25 +65,25 @@ class TestShapes < Test::Unit::TestCase
def test_iv_index
example = RemoveAndAdd.new
shape = RubyVM::Shape.of(example)
- assert_equal 0, shape.iv_count
+ assert_equal 0, shape.next_iv_index
example.add_foo # makes a transition
new_shape = RubyVM::Shape.of(example)
assert_equal([:@foo], example.instance_variables)
assert_equal(shape.id, new_shape.parent.id)
- assert_equal(1, new_shape.iv_count)
+ assert_equal(1, new_shape.next_iv_index)
example.remove # makes a transition
remove_shape = RubyVM::Shape.of(example)
assert_equal([], example.instance_variables)
assert_equal(new_shape.id, remove_shape.parent.id)
- assert_equal(1, remove_shape.iv_count)
+ assert_equal(1, remove_shape.next_iv_index)
example.add_bar # makes a transition
bar_shape = RubyVM::Shape.of(example)
assert_equal([:@bar], example.instance_variables)
assert_equal(remove_shape.id, bar_shape.parent.id)
- assert_equal(2, bar_shape.iv_count)
+ assert_equal(2, bar_shape.next_iv_index)
end
def test_new_obj_has_root_shape