diff options
Diffstat (limited to 'ext/json/lib/json/ext.rb')
-rw-r--r-- | ext/json/lib/json/ext.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/json/lib/json/ext.rb b/ext/json/lib/json/ext.rb new file mode 100644 index 0000000000..c5f813181d --- /dev/null +++ b/ext/json/lib/json/ext.rb @@ -0,0 +1,21 @@ +if ENV['SIMPLECOV_COVERAGE'].to_i == 1 + require 'simplecov' + SimpleCov.start do + add_filter "/tests/" + end +end +require 'json/common' + +module JSON + # This module holds all the modules/classes that implement JSON's + # functionality as C extensions. + module Ext + require 'json/ext/parser' + require 'json/ext/generator' + $DEBUG and warn "Using Ext extension for JSON." + JSON.parser = Parser + JSON.generator = Generator + end + + JSON_LOADED = true unless defined?(::JSON::JSON_LOADED) +end |