# # Pervasives allows an object's methods to be accessed in a pristine state, # even when some effort has been made to derride them # require 'pervasives' class BlankSlate instance_methods.each{|m| undef_method m unless m[%r/__/]} end bs = BlankSlate.new p Pervasives(bs).methods #=> ["__object_pervasive__", "__id__", "__send__", "__pervasive__"] p Pervasives(bs).is_a?(BlankSlate) #=> true p Pervasives(bs).instance_eval{ @a = 42 } #=> 42 p Pervasives(bs).instance_variables #=> ["@a"]