summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-12 12:18:51 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-12 12:18:51 +0000
commit7630957ebaaf982575f93a6e7ebfd08d679e6293 (patch)
tree22da5ef7f7828781589851cd577ad5643d15d88c /test
parentb3abb691daa86e8336a3e2e426e2b2621651896b (diff)
iseq.c (iseq_memsize): reimplement for wrapper
* iseq.c (iseq_memsize): reimplement for wrapper (param_keyword_size): extracted from iseq_memsize (iseqw_mark): new mark function (iseqw_data_type): new data type (iseqw_new): wrap as iseqw_data_type (iseqw_check): adjust for wrapper (Init_ISeq): remove iseqw_iseq_key initialization * test/objspace/test_objspace.rb: new test [ruby-core:70344] [Feature #11435] v2 changes: - added RUBY_TYPED_WB_PROTECTED and write barrier - account for rb_call_info_kw_arg_t entries git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/objspace/test_objspace.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 01f31cc784..3036b879bb 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -88,6 +88,12 @@ class TestObjSpace < Test::Unit::TestCase
assert_not_empty(res)
end
+ def test_memsize_of_iseq
+ iseqw = RubyVM::InstructionSequence.compile('def a; a = :b; end')
+ base_obj_size = ObjectSpace.memsize_of(Object.new)
+ assert_operator(ObjectSpace.memsize_of(iseqw), :>, base_obj_size)
+ end
+
def test_reachable_objects_from
assert_separately %w[--disable-gem -robjspace], __FILE__, __LINE__, <<-'eom'
assert_equal(nil, ObjectSpace.reachable_objects_from(nil))