diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 06:14:29 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 06:14:29 +0000 |
commit | e40ab5942b9577847c6b3203221916ddcee1cd83 (patch) | |
tree | 6a22dde71f625a201e51ac238fc4b4dbf7c99713 | |
parent | a60e00fde84929b2b5b3943107ce2bae3db14935 (diff) |
* lib/rubygems/test_case.rb: use explicitly exception class and reverted
to require JSON library for rubygems tests with Ruby 2.2.0 or earlier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/rubygems/test_case.rb | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sun Apr 12 15:11:16 2015 SHIBATA Hiroshi <[email protected]> + + * lib/rubygems/test_case.rb: use explicitly exception class and reverted + to require JSON library for rubygems tests with Ruby 2.2.0 or earlier. + Sun Apr 12 15:10:18 2015 Nobuyoshi Nakada <[email protected]> * ext/io/wait/wait.c (io_wait_readable): simply returns that IO is diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb index 85a159f938..a116b6c93c 100644 --- a/lib/rubygems/test_case.rb +++ b/lib/rubygems/test_case.rb @@ -23,10 +23,16 @@ unless Gem::Dependency.new('rdoc', '>= 3.10').matching_specs.empty? gem 'rdoc' begin gem 'json' - rescue LoadError + rescue Gem::LoadError + # for Ruby 2.3.0 end end +begin + require 'json' +rescue LoadError +end + require 'minitest/autorun' require 'rubygems/deprecate' |