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

ruby-changes:18155

From: tenderlove <ko1@a...>
Date: Sat, 11 Dec 2010 10:25:36 +0900 (JST)
Subject: [ruby-changes:18155] Ruby:r30176 (trunk): refactor load error rescue to the openssl util file

tenderlove	2010-12-11 10:25:25 +0900 (Sat, 11 Dec 2010)

  New Revision: 30176

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

  Log:
    refactor load error rescue to the openssl util file

  Modified files:
    trunk/test/openssl/test_asn1.rb
    trunk/test/openssl/test_bn.rb
    trunk/test/openssl/test_cipher.rb
    trunk/test/openssl/test_pair.rb
    trunk/test/openssl/utils.rb

Index: test/openssl/test_pair.rb
===================================================================
--- test/openssl/test_pair.rb	(revision 30175)
+++ test/openssl/test_pair.rb	(revision 30176)
@@ -1,8 +1,4 @@
-begin
-  require "openssl"
-rescue LoadError
-end
-require 'test/unit'
+require_relative 'utils'
 
 if defined?(OpenSSL)
 
Index: test/openssl/test_bn.rb
===================================================================
--- test/openssl/test_bn.rb	(revision 30175)
+++ test/openssl/test_bn.rb	(revision 30176)
@@ -1,9 +1,5 @@
-begin
-  require "openssl"
-rescue LoadError
-end
+require_relative 'utils'
 require "digest/md5"
-require "test/unit"
 
 if defined?(OpenSSL)
 
Index: test/openssl/utils.rb
===================================================================
--- test/openssl/utils.rb	(revision 30175)
+++ test/openssl/utils.rb	(revision 30176)
@@ -1,4 +1,7 @@
-require "openssl"
+begin
+  require "openssl"
+rescue LoadError
+end
 require "test/unit"
 
 module OpenSSL::TestUtils
@@ -141,4 +144,4 @@
       $VERBOSE = back
     end
   end
-end
+end if defined?(OpenSSL)
Index: test/openssl/test_asn1.rb
===================================================================
--- test/openssl/test_asn1.rb	(revision 30175)
+++ test/openssl/test_asn1.rb	(revision 30176)
@@ -1,9 +1,4 @@
-begin
-  require "openssl"
-  require_relative 'utils'
-rescue LoadError
-end
-require 'test/unit'
+require_relative 'utils'
 
 class  OpenSSL::TestASN1 < Test::Unit::TestCase
   def test_decode
Index: test/openssl/test_cipher.rb
===================================================================
--- test/openssl/test_cipher.rb	(revision 30175)
+++ test/openssl/test_cipher.rb	(revision 30176)
@@ -1,8 +1,4 @@
-begin
-  require "openssl"
-rescue LoadError
-end
-require "test/unit"
+require_relative 'utils'
 
 if defined?(OpenSSL)
 

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

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