From b57915eddc91ce0369ae8bcf82d8c4364f42ea05 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Tue, 12 Dec 2017 00:46:34 +0000 Subject: Add FrozenError as a subclass of RuntimeError FrozenError will be used instead of RuntimeError for exceptions raised when there is an attempt to modify a frozen object. The reason for this change is to differentiate exceptions related to frozen objects from generic exceptions such as those generated by Kernel#raise without an exception class. From: Jeremy Evans Signed-off-by: Urabe Shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_marshal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby/test_marshal.rb') diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 48a7d03428..80ec0b1684 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -568,7 +568,7 @@ class TestMarshal < Test::Unit::TestCase s.instance_variable_set(:@t, 42) t = Bug8276.new(s) s = Marshal.dump(t) - assert_raise(RuntimeError) {Marshal.load(s)} + assert_raise(FrozenError) {Marshal.load(s)} end def test_marshal_load_ivar -- cgit v1.2.3