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

ruby-changes:16186

From: knu <ko1@a...>
Date: Thu, 3 Jun 2010 23:48:37 +0900 (JST)
Subject: [ruby-changes:16186] Ruby:r28149 (trunk): * ext/digest/lib/digest/hmac.rb: Emit a deprecation warning in

knu	2010-06-03 23:48:23 +0900 (Thu, 03 Jun 2010)

  New Revision: 28149

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

  Log:
    * ext/digest/lib/digest/hmac.rb: Emit a deprecation warning in
      verbose mode and add a caution to the overview section of the
      document. [ruby-dev:41525]

  Modified files:
    trunk/ChangeLog
    trunk/ext/digest/lib/digest/hmac.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28148)
+++ ChangeLog	(revision 28149)
@@ -1,3 +1,9 @@
+Thu Jun  3 23:34:55 2010  Akinori MUSHA  <knu@i...>
+
+	* ext/digest/lib/digest/hmac.rb: Emit a deprecation warning in
+	  verbose mode and add a caution to the overview section of the
+	  document. [ruby-dev:41525]
+
 Thu Jun  3 19:33:51 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/dl/cfunc.c (rb_dlcfunc_inspect): suppress warnings by
Index: ext/digest/lib/digest/hmac.rb
===================================================================
--- ext/digest/lib/digest/hmac.rb	(revision 28148)
+++ ext/digest/lib/digest/hmac.rb	(revision 28149)
@@ -4,6 +4,11 @@
 #
 # == Overview
 #
+# CAUTION: Use of this library is discouraged, because this
+# implementation was meant to be experimental but somehow got into the
+# 1.9 series without being noticed.  Please use OpenSSL::HMAC in the
+# "openssl" library instead.
+#
 # This library adds a method named hmac() to Digest classes, which
 # creates a Digest class for calculating HMAC digests.
 #
@@ -36,6 +41,8 @@
 #   $Id$
 #
 
+warn "use of the experimetal library 'digest/hmac' is discouraged; require 'openssl' and use OpenSSL::HMAC instead." if $VERBOSE
+
 require 'digest'
 
 module Digest

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

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