summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 05:53:30 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 05:53:30 +0000
commit1cb21311533825d567c8c574d2311dbf4b0f14ff (patch)
tree053a9f9fefeaa20b5aa4df6460820e3e06bee9d8 /lib
parent2abf47bff9a9780f8640a7d89caef9915cbe6bd0 (diff)
* lib/rubygems/test_case.rb: fixed json load error for rubygems tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/test_case.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index b1aabb658d..85a159f938 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -21,12 +21,10 @@ 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'
- gem 'json'
-end
-
-begin
- require 'json'
-rescue LoadError
+ begin
+ gem 'json'
+ rescue LoadError
+ end
end
require 'minitest/autorun'