summaryrefslogtreecommitdiff
path: root/ext/openssl/lib/openssl/digest.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-10 07:16:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-10 07:16:01 +0000
commit0ede9926f792acf9369699d36debb0ade09d22a9 (patch)
tree886c4483631e25b0aedb5b517bf8fde938d88463 /ext/openssl/lib/openssl/digest.rb
parent40d7c9c18b024f234f5fdd5c51fb843d9c229efc (diff)
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 'ext/openssl/lib/openssl/digest.rb')
-rw-r--r--ext/openssl/lib/openssl/digest.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb
index 5b3b06460c..64211cd980 100644
--- a/ext/openssl/lib/openssl/digest.rb
+++ b/ext/openssl/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)
}