Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo
- BAR = {a: []}
- def initialize
- @whatever = BAR.dup
- #...
- @whatever[:a].push "foo"
- puts @whatever[:a].length
- end
- end
- Foo.new #output: 1
- Foo.new #output: 2
- Foo.new #output: 3
- Foo.new #output: 4
- Foo.new #output: 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement