Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test(&block)
- GC.disable
- before_strings = ObjectSpace.each_object(String).to_a
- yield
- after_strings = ObjectSpace.each_object(String).to_a
- p after_strings - before_strings
- GC.enable
- end
- puts "Before"
- ababa = ["test", 'hello', 'world']
- test do
- "epic" * 20
- "longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong"
- "text"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement