[ create a new paste ] login | about

Link: http://codepad.org/vYznrZoO    [ raw code | output | fork ]

Ruby, pasted on Jul 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ContentFor = Class.new
x = ContentFor.new 

puts x.class.object_id
puts x.class.name

ContentFor = Class.new
y = ContentFor.new

puts x.class.object_id
puts x.class.name

puts y.class.object_id
puts y.class.name

puts ContentFor.object_id


Output:
1
2
3
4
5
6
7
8
t.rb:7: warning: already initialized constant ContentFor
537787360
ContentFor
537787360
ContentFor
537787300
ContentFor
537787300


Create a new paste based on this one


Comments: