Sha256: 67cb471574db0b16ed2539a7bf3ffe3c8ff646ff3497f3ee73b7244739aec964
Contents?: true
Size: 355 Bytes
Versions: 19
Compression:
Stored size: 355 Bytes
Contents
# Little patch for Ruby 1.8 to give it BasicObject support unless defined?(BasicObject) class BasicObject KEEP_METHODS = %w"__id__ __send__ instance_eval == equal? initialize" def self.remove_methods! m = (private_instance_methods + instance_methods) - KEEP_METHODS m.each{|m| undef_method(m)} end remove_methods! end end
Version data entries
19 entries across 19 versions & 1 rubygems