summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 22:03:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 22:03:24 +0000
commit86c58b7813ffec29dcdb243e42f93dc33b5ba132 (patch)
treea83648ff8c2b03c459e745ac6d1604348e4dc698 /error.c
parenta9d25a31ee8d36766163744da57d287a86e1ce18 (diff)
* error.c (rb_exc_new3): keeps the given string itself.
* eval.c (Init_Proc), gc.c (Init_GC): freeze messages of preallocated special exceptions also. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index af72126f8e..3b79ea0fa7 100644
--- a/error.c
+++ b/error.c
@@ -333,7 +333,7 @@ rb_exc_new3(etype, str)
VALUE etype, str;
{
StringValue(str);
- return rb_exc_new(etype, RSTRING(str)->ptr, RSTRING(str)->len);
+ return rb_funcall(etype, rb_intern("new"), 1, str);
}
/*