Sha256: d00373859dba75866257a32f52dc792083461d64400773010047432d55c7ebb1

Contents?: true

Size: 379 Bytes

Versions: 4

Compression:

Stored size: 379 Bytes

Contents

module TimeCrisis
  if defined? ::BasicObject
    class BasicObject < ::BasicObject
      undef_method :==
      undef_method :equal?

      def raise(*args)
        ::Object.send(:raise, *args)
      end
    end
  else
    class BasicObject
      instance_methods.each do |m|
        undef_method(m) if m.to_s !~ /(?:^__|^nil\?$|^send$|^object_id$)/
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
time_crisis-0.3.5 lib/time_crisis/support/basic_object.rb
time_crisis-0.3.2 lib/time_crisis/support/basic_object.rb
time_crisis-0.3.1 lib/time_crisis/support/basic_object.rb
time_crisis-0.3.0 lib/time_crisis/support/basic_object.rb