From 2e4f0af00f85ca228bcf5fa919882359411c652a Mon Sep 17 00:00:00 2001 From: hsbt Date: Sun, 12 Apr 2015 08:36:37 +0000 Subject: * ext/json/*, test/json/*: Reverted r50231. Because it's not works with cross-compile environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/rubygems_hook.rb | 8 ++------ lib/rdoc/test_case.rb | 6 +----- lib/rubygems/test_case.rb | 11 +---------- 3 files changed, 4 insertions(+), 21 deletions(-) (limited to 'lib') diff --git a/lib/rdoc/rubygems_hook.rb b/lib/rdoc/rubygems_hook.rb index 5711aa1abf..c4eaddbd97 100644 --- a/lib/rdoc/rubygems_hook.rb +++ b/lib/rdoc/rubygems_hook.rb @@ -3,11 +3,6 @@ require 'rubygems/user_interaction' require 'fileutils' require 'rdoc' -begin - require 'json' -rescue LoadError -end - ## # Gem::RDoc provides methods to generate RDoc and ri data for installed gems # upon gem installation. @@ -205,7 +200,7 @@ class RDoc::RubygemsHook @generate_ri and (@force or not File.exist? @ri_dir) document 'darkfish', options, @rdoc_dir if - defined?(JSON) and @generate_rdoc and (@force or not File.exist? @rdoc_dir) + @generate_rdoc and (@force or not File.exist? @rdoc_dir) end ## @@ -255,3 +250,4 @@ class RDoc::RubygemsHook end end + diff --git a/lib/rdoc/test_case.rb b/lib/rdoc/test_case.rb index 3b2c181201..4989516b7a 100644 --- a/lib/rdoc/test_case.rb +++ b/lib/rdoc/test_case.rb @@ -6,11 +6,6 @@ rescue NoMethodError, Gem::LoadError # for ruby tests end -begin - require 'json' -rescue LoadError -end - require 'minitest/autorun' require 'minitest/benchmark' if ENV['BENCHMARK'] @@ -219,3 +214,4 @@ $LOAD_PATH.each do |load_path| break if load_path[0] == ?/ load_path.replace File.expand_path load_path end if RUBY_VERSION < '1.9' + diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index a116b6c93c..306edcc3f6 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -21,16 +21,7 @@ end # them while we're testing rubygems, and thus we can't actually load them. unless Gem::Dependency.new('rdoc', '>= 3.10').matching_specs.empty? gem 'rdoc' - begin - gem 'json' - rescue Gem::LoadError - # for Ruby 2.3.0 - end -end - -begin - require 'json' -rescue LoadError + gem 'json' end require 'minitest/autorun' -- cgit v1.2.3