Advertisement
Guest User

Untitled

a guest
Apr 14th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Foo
  2.  
  3.   BAR = {a: []}
  4.  
  5.   def initialize
  6.     @whatever = BAR.dup
  7.     #...
  8.     @whatever[:a].push "foo"
  9.     puts @whatever[:a].length
  10.   end
  11.  
  12. end
  13.  
  14. Foo.new #output: 1
  15. Foo.new #output: 2
  16. Foo.new #output: 3
  17. Foo.new #output: 4
  18. Foo.new #output: 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement