blob: 6be40d2be2a32485a677e1251149bc31773c4ae7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
require 'openssl'
require "test/unit"
class OpenSSL::TestConfig < Test::Unit::TestCase
def test_freeze
skip "need an argument for OpenSSL::Config.new on Windows" if /mswin|mingw/ =~ RUBY_PLATFORM
c = OpenSSL::Config.new
c['foo'] = [['key', 'value']]
c.freeze
# [ruby-core:18377]
assert_raise(RuntimeError, /frozen/) do
c['foo'] = [['key', 'wrong']]
end
end
end
|