aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_class.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r--test/ruby/test_class.rb3
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