summaryrefslogtreecommitdiff
path: root/lib/json/ext.rb
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2009-08-24 16:20:32 +0200
committerFlorian Frank <flori@ping.de>2009-08-24 16:20:32 +0200
commit10f03df1f6a54edaae86e87e1fd7d9a6a6a319f1 (patch)
treed7133d6f5ba8bc2f195ee6e070b34331bd4f5d04 /lib/json/ext.rb
downloadjson-10f03df1f6a54edaae86e87e1fd7d9a6a6a319f1.tar.gz
initial commit
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