twitter-status-bot/.gems/gems/naught-1.0.0/lib/naught/basic_object.rb

18 lines
465 B
Ruby
Raw Normal View History

2014-09-03 08:49:59 +00:00
module Naught
if defined? ::BasicObject
class BasicObject < ::BasicObject
end
else
class BasicObject #:nodoc:
keep = %w[
! != == __id__ __send__ equal? instance_eval instance_exec
method_missing singleton_method_added singleton_method_removed
singleton_method_undefined
]
instance_methods.each do |method_name|
undef_method(method_name) unless keep.include?(method_name)
end
end
end
end