[前][次][番号順一覧][スレッド一覧]

ruby-changes:38183

From: hsbt <ko1@a...>
Date: Sun, 12 Apr 2015 23:18:40 +0900 (JST)
Subject: [ruby-changes:38183] hsbt:r50264 (trunk): * lib/rubygems/test_case.rb: use explicitly exception class and reverted

hsbt	2015-04-12 15:14:29 +0900 (Sun, 12 Apr 2015)

  New Revision: 50264

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50264

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/test_case.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50263)
+++ ChangeLog	(revision 50264)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Apr 12 15:11:16 2015  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* 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  <nobu@r...>
 
 	* ext/io/wait/wait.c (io_wait_readable): simply returns that IO is
Index: lib/rubygems/test_case.rb
===================================================================
--- lib/rubygems/test_case.rb	(revision 50263)
+++ lib/rubygems/test_case.rb	(revision 50264)
@@ -23,10 +23,16 @@ unless Gem::Dependency.new('rdoc', '>= 3 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L23
   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'

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]