ext.rb 508 B

123456789101112131415161718192021
  1. if ENV['SIMPLECOV_COVERAGE'].to_i == 1
  2. require 'simplecov'
  3. SimpleCov.start do
  4. add_filter "/tests/"
  5. end
  6. end
  7. require 'json/common'
  8. module JSON
  9. # This module holds all the modules/classes that implement JSON's
  10. # functionality as C extensions.
  11. module Ext
  12. require 'json/ext/parser'
  13. require 'json/ext/generator'
  14. $DEBUG and warn "Using Ext extension for JSON."
  15. JSON.parser = Parser
  16. JSON.generator = Generator
  17. end
  18. JSON_LOADED = true unless defined?(::JSON::JSON_LOADED)
  19. end