summaryrefslogtreecommitdiff
path: root/lib/json/ext.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/json/ext.rb')
-rw-r--r--lib/json/ext.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/json/ext.rb b/lib/json/ext.rb
new file mode 100644
index 0000000..719e560
--- /dev/null
+++ b/lib/json/ext.rb
@@ -0,0 +1,15 @@
+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 c extension for JSON."
+ JSON.parser = Parser
+ JSON.generator = Generator
+ end
+
+ JSON_LOADED = true
+end