diff options
Diffstat (limited to 'ext/json/lib/json/ext.rb')
-rw-r--r-- | ext/json/lib/json/ext.rb | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/ext/json/lib/json/ext.rb b/ext/json/lib/json/ext.rb index 1fbc3fd7d1..7264a857fa 100644 --- a/ext/json/lib/json/ext.rb +++ b/ext/json/lib/json/ext.rb @@ -4,21 +4,8 @@ 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 + require 'json/ext/parser' + require 'json/ext/generator' $DEBUG and warn "Using Ext extension for JSON." JSON.parser = Parser JSON.generator = Generator |