From 2c3a48614a49e5021cbe5cccff00e6464a1d4e21 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 26 Nov 2009 12:18:04 +0000 Subject: [PATCH] * test/openssl/test_config.rb (OpenSSL::TestConfig): new test case. test for r25017. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/openssl/test_config.rb | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 test/openssl/test_config.rb diff --git a/ChangeLog b/ChangeLog index f0bec1993c..ff7cea8d71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 26 21:11:23 2009 Yuki Sonoda (Yugui) + + * test/openssl/test_config.rb (OpenSSL::TestConfig): new test case. + test for r25017. + Thu Nov 26 21:08:54 2009 Yuki Sonoda (Yugui) * test/ruby/test_range.rb (TestRange#test_comparison_when_recursive): diff --git a/test/openssl/test_config.rb b/test/openssl/test_config.rb new file mode 100644 index 0000000000..9578bb2547 --- /dev/null +++ b/test/openssl/test_config.rb @@ -0,0 +1,15 @@ +require 'openssl' +require "test/unit" + +class OpenSSL::TestConfig < Test::Unit::TestCase + def test_freeze + 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