pure.rb 499 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. require 'json/pure/parser'
  9. require 'json/pure/generator'
  10. module JSON
  11. # This module holds all the modules/classes that implement JSON's
  12. # functionality in pure ruby.
  13. module Pure
  14. $DEBUG and warn "Using Pure library for JSON."
  15. JSON.parser = Parser
  16. JSON.generator = Generator
  17. end
  18. JSON_LOADED = true unless defined?(::JSON::JSON_LOADED)
  19. end