diff options
author | nobu <nobu@ruby-lang.org> | 2013-12-10 07:16:01 +0000 |
---|---|---|
committer | nobu <nobu@ruby-lang.org> | 2013-12-10 07:16:01 +0000 |
commit | 29d6aa6d6a7fa4902a56f4699d42aa83112afea3 (patch) | |
tree | 30901ce796eabe9b37699c10fa7517259d4a5c4c /lib/openssl | |
parent | 769283fbdad9488331c80d385d40b2d5466313b3 (diff) | |
download | ruby-openssl-history-29d6aa6d6a7fa4902a56f4699d42aa83112afea3.tar.gz |
openssl/digest.rb: get rid of deprecated class
* ext/openssl/lib/openssl/digest.rb (digest, hexdigest): create
new instance and call on it directly, to get rid of deprecated
class OpenSSL::Digest::Digest.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/openssl')
-rw-r--r-- | lib/openssl/digest.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/openssl/digest.rb b/lib/openssl/digest.rb index 5b3b064..64211cd 100644 --- a/lib/openssl/digest.rb +++ b/lib/openssl/digest.rb @@ -38,7 +38,7 @@ module OpenSSL # OpenSSL::Digest::SHA256.digest("abc") def self.digest(name, data) - super(data, name) + super(data, name) end alg.each{|name| @@ -53,8 +53,8 @@ module OpenSSL } singleton = (class << klass; self; end) singleton.class_eval{ - define_method(:digest){|data| Digest.digest(name, data) } - define_method(:hexdigest){|data| Digest.hexdigest(name, data) } + define_method(:digest){|data| new.digest(data) } + define_method(:hexdigest){|data| new.hexdigest(data) } } const_set(name, klass) } |