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.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/json/ext.rb b/lib/json/ext.rb
new file mode 100644
index 0000000000..ff4fa42329
--- /dev/null
+++ b/lib/json/ext.rb
@@ -0,0 +1,13 @@
+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
+end