Sha256: 6d8d7ebba2019590e8341e23fae18ac6ad77cc11f4284c360bf601e2def8a812
Contents?: true
Size: 417 Bytes
Versions: 1
Compression:
Stored size: 417 Bytes
Contents
# # even if hackery removes the __pervasive__ method you can still call a # pristine method on an object # require 'pervasives' class VeryBlankSlate instance_methods.each{ |m| undef_method m } end vbs = VeryBlankSlate.new begin vbs.__pervasive__ rescue 'nope not even that' end Pervasives.call(vbs, :instance_eval){ @a = 42 } p Pervasives.call(vbs, :instance_variables) #=> ["@a"]
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pervasives-1.1.0 | samples/c.rb |