summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/rubygems/test_case.rb10
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index b4e864785f..a54d7a4b81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Apr 12 14:53:23 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+
+ * lib/rubygems/test_case.rb: fixed json load error for rubygems tests.
+
Sun Apr 12 14:13:28 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* gc.c: Document require name for ObjectSpace methods.
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'