undef singleton method from ruby object -
i able undef singleton method on given object.
class end = a.new def a.foo puts "bar" end # undef a.foo here a.foo # should crash
class end = a.new def a.foo puts "bar" end a.instance_eval { undef :foo } a.foo # => undefined method `foo' #<a:0x8469c60> (nomethoderror)
Comments
Post a Comment