Sha256: 8f3c1012b159255a88f7b8d51df296fb8ffa21bc1f7c45fafb04afb416947d40

Contents?: true

Size: 851 Bytes

Versions: 15

Compression:

Stored size: 851 Bytes

Contents

require 'json/common'

module JSON
  # This module holds all the modules/classes that implement JSON's
  # functionality as C extensions.
  module Ext
    begin
      if defined?(RUBY_ENGINE) == 'constant' and RUBY_ENGINE == 'ruby' and RUBY_VERSION =~ /\A1\.9\./
        require 'json/ext/1.9/parser'
        require 'json/ext/1.9/generator'
      elsif !defined?(RUBY_ENGINE) && RUBY_VERSION =~ /\A1\.8\./
        require 'json/ext/1.8/parser'
        require 'json/ext/1.8/generator'
      else
        require 'json/ext/parser'
        require 'json/ext/generator'
      end
    rescue LoadError
      require 'json/ext/parser'
      require 'json/ext/generator'
    end
    $DEBUG and warn "Using Ext extension for JSON."
    JSON.parser = Parser
    JSON.generator = Generator
  end

  JSON_LOADED = true unless defined?(::JSON::JSON_LOADED)
end

Version data entries

15 entries across 15 versions & 6 rubygems

Version Path
xpflow-0.1c lib/json/ext.rb
xpflow-0.1b lib/json/ext.rb
json-maglev--1.5.4 lib/json/ext.rb
json-1.5.3-java lib/json/ext.rb
json_pure-1.5.3 lib/json/ext.rb
json-1.5.3 lib/json/ext.rb
json-1.5.2-java lib/json/ext.rb
json-1.5.2 lib/json/ext.rb
json_pure-1.5.2 lib/json/ext.rb
larsklevan-json-1.5.1 lib/json/ext.rb
taps-0.3.19 lib/taps/vendor/json_pure-1.5.1/lib/json/ext.rb
taps-0.3.19.pre1 lib/taps/vendor/json_pure-1.5.1/lib/json/ext.rb
json_pure-1.5.1 lib/json/ext.rb
json-1.5.1 lib/json/ext.rb
json-1.5.1-java lib/json/ext.rb