diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-13 13:03:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-13 13:03:46 +0000 |
commit | 4df147d6e8b6503b4a3068a3e9330e5d90ba3d87 (patch) | |
tree | d9a4e539e742e38acacbc36cdf068c31bd9b6e56 /test | |
parent | 05b374b82461af2d68dfba472cf382bcc98379d7 (diff) | |
download | ruby-4df147d6e8b6503b4a3068a3e9330e5d90ba3d87.tar.gz |
class.c: freeze meta class only
* class.c (singleton_class_of): should not propagete freezing to
meta meta class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_class.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 7259594f8e..293524b079 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -392,6 +392,9 @@ class TestClass < Test::Unit::TestCase assert_raise_with_message(RuntimeError, /frozen object/) { c.class_eval {def f; end} } + end + + def test_singleton_class_message c = Class.new.freeze assert_raise_with_message(RuntimeError, /frozen Class/) { def c.f; end |