summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-13 01:22:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-13 01:22:01 +0000
commit0fa955360437fc8e1aee58c72ab7fc96f0d54f0d (patch)
tree7aa76cfb675f0ee80ca33ced97747671b837b0cf /test
parent92c1d1a9503cc2920082195dc7afcdc5be0e4ca7 (diff)
eval.c: fix message as same as previous versions
* eval.c (rb_frozen_class_p): fix message for singleton class of class/module as same as previous versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_class.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 9a4cdb0f58..7259594f8e 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -389,8 +389,12 @@ class TestClass < Test::Unit::TestCase
obj = Object.new
c = obj.singleton_class
obj.freeze
- assert_raise(RuntimeError, /frozen object/) {
+ assert_raise_with_message(RuntimeError, /frozen object/) {
c.class_eval {def f; end}
}
+ c = Class.new.freeze
+ assert_raise_with_message(RuntimeError, /frozen Class/) {
+ def c.f; end
+ }
end
end