diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-07-10 23:25:17 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-07-10 23:25:17 +0900 |
commit | ffc3781d219bae041929eb65b63b416673b7db32 (patch) | |
tree | 160f49668783cddcab8d49179dedd7d783b34a1d /test/test_cipher.rb | |
parent | 9d5c823c07b576a4cce55d75392064182b2ec3bc (diff) | |
download | ruby-openssl-ffc3781d219bae041929eb65b63b416673b7db32.tar.gz |
Suppress warnings in tests
Diffstat (limited to 'test/test_cipher.rb')
-rw-r--r-- | test/test_cipher.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/test_cipher.rb b/test/test_cipher.rb index 81b4c45d..ada1fb26 100644 --- a/test/test_cipher.rb +++ b/test/test_cipher.rb @@ -5,16 +5,12 @@ if defined?(OpenSSL::TestUtils) class OpenSSL::TestCipher < OpenSSL::TestCase + @ciphers = OpenSSL::Cipher.ciphers + class << self def has_cipher?(name) - ciphers = OpenSSL::Cipher.ciphers - # redefine method so we can use the cached ciphers value from the closure - # and need not recompute the list each time - define_singleton_method :has_cipher? do |name| - ciphers.include?(name) - end - has_cipher?(name) + @ciphers.include?(name) end def has_ciphers?(list) |