aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 00:46:34 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 00:46:34 +0000
commit346192511ab0e787b97421c538c44d777054ab42 (patch)
treec5296c8fd95c9ee041fe66455eb0744c3212b5c5 /object.c
parent60972aca15092bbd85808ef1a5b41569135811dc (diff)
downloadruby-346192511ab0e787b97421c538c44d777054ab42.tar.gz
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 <code@jeremyevans.net> Signed-off-by: Urabe Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index c417141a67..adec3f5e76 100644
--- a/object.c
+++ b/object.c
@@ -1315,7 +1315,7 @@ rb_obj_infect(VALUE victim, VALUE carrier)
*
* <em>produces:</em>
*
- * prog.rb:3:in `<<': can't modify frozen Array (RuntimeError)
+ * prog.rb:3:in `<<': can't modify frozen Array (FrozenError)
* from prog.rb:3
*
* Objects of the following classes are always frozen: Integer,