diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/objspace/test_objspace.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 04a33817de..3c22dae551 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -17,6 +17,10 @@ class TestObjSpace < Test::Unit::TestCase f.close assert_kind_of(Integer, ObjectSpace.memsize_of(/a/.match("a"))) assert_kind_of(Integer, ObjectSpace.memsize_of(Struct.new(:a))) + + assert_operator(ObjectSpace.memsize_of(Regexp.new("(a)"*1000).match("a"*1000)), + :>, + ObjectSpace.memsize_of(//.match(""))) end def test_memsize_of_all |