summaryrefslogtreecommitdiffstats
path: root/lib/json/ext.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-04 12:31:26 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-04 12:31:26 +0000
commit4fac3a042baf75b31b7cc7d06ce9052d48ed9d92 (patch)
treefe952114fed9f49b11fa58533478ef130eddeba7 /lib/json/ext.rb
parentacb1179cd8edcd48e74178acf7d65e6c71181199 (diff)
downloadruby-4fac3a042baf75b31b7cc7d06ce9052d48ed9d92.tar.gz
ruby-4fac3a042baf75b31b7cc7d06ce9052d48ed9d92.tar.xz
ruby-4fac3a042baf75b31b7cc7d06ce9052d48ed9d92.zip
* lib/json.rb, lib/json, ext/json, test/json:
import JSON library. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 000000000..ff4fa4232
--- /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