dup

Ruby code posted
created at 14 Jan 18:13

Edit | Back
1
2
3
4
5
6
7
a = Object.new
def a.foo; :foo end
p a.foo
# => :foo
b = a.dup
p b.foo
# => undefined method `foo' for #<Object:0x007f8bc395ff00> (NoMethodError)
151 Bytes in 3 ms with coderay