M
Mystifier
------=_NextPart_000_003C_01C506F8.C0F33EB0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
irb(main):001:0> a = Object.new
=> #<Object:0x2ae06d8>
irb(main):002:0> def a.p
irb(main):003:1> print "in a.p"
irb(main):004:1> end
=> nil
irb(main):005:0> a.p
in a.p=> nil
irb(main):006:0> b = a.dup
=> #<Object:0x2ad8668>
irb(main):007:0> b.p
NoMethodError: private method `p' called for #<Object:0x2ad8668>
from (irb):7
irb(main):008:0>
Duplication of singleton methods is not desirable?
Mystifier
------=_NextPart_000_003C_01C506F8.C0F33EB0--
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
irb(main):001:0> a = Object.new
=> #<Object:0x2ae06d8>
irb(main):002:0> def a.p
irb(main):003:1> print "in a.p"
irb(main):004:1> end
=> nil
irb(main):005:0> a.p
in a.p=> nil
irb(main):006:0> b = a.dup
=> #<Object:0x2ad8668>
irb(main):007:0> b.p
NoMethodError: private method `p' called for #<Object:0x2ad8668>
from (irb):7
irb(main):008:0>
Duplication of singleton methods is not desirable?
Mystifier
------=_NextPart_000_003C_01C506F8.C0F33EB0--