Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. require 'allocation_stats'
  2.  
  3. stats = AllocationStats.trace { x = 'stuff'; String.new(x) }
  4. puts stats.allocations(alias_paths: true).to_text
  5. puts
  6. stats2 = AllocationStats.trace { String.new("stuff")}
  7. puts stats2.allocations(alias_paths: true).to_text
  8. puts
  9. stats3 = AllocationStats.trace { x = "stuff" }
  10. puts stats3.allocations(alias_paths: true).to_text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement