diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 00:46:34 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 00:46:34 +0000 |
commit | b57915eddc91ce0369ae8bcf82d8c4364f42ea05 (patch) | |
tree | c5296c8fd95c9ee041fe66455eb0744c3212b5c5 /test/ruby/test_range.rb | |
parent | 0b31ce0047513d1eb8f9902286215025a3742bf5 (diff) |
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 <[email protected]>
Signed-off-by: Urabe Shyouhei <[email protected]>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_range.rb')
-rw-r--r-- | test/ruby/test_range.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index 77d026c912..fef7acc062 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -22,7 +22,7 @@ class TestRange < Test::Unit::TestCase def test_frozen_initialize r = Range.allocate r.freeze - assert_raise(RuntimeError){r.__send__(:initialize, 1, 2)} + assert_raise(FrozenError){r.__send__(:initialize, 1, 2)} end def test_range_string |