summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-02 10:03:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-02 10:03:54 +0000
commitb6fe3dae4de7002c2f58bc9cfb993033dff7927d (patch)
treeb017b82c48b45ae98f3ed92acb3863372ed9d77f /error.c
parenta1d8147e4419d81cd93c664b85f7062c89101c87 (diff)
call initialize
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/error.c b/error.c
index 9e8f54479c..74c2cbb8be 100644
--- a/error.c
+++ b/error.c
@@ -268,13 +268,17 @@ exc_s_new(argc, argv, etype)
VALUE *argv;
VALUE etype;
{
- VALUE arg;
+ VALUE arg, exc;
if (rb_scan_args(argc, argv, "01", &arg) == 0) {
- return exc_new(etype, 0, 0);
+ exc = exc_new(etype, 0, 0);
}
- Check_Type(arg, T_STRING);
- return exc_new3(etype, arg);
+ else {
+ Check_Type(arg, T_STRING);
+ exc = exc_new3(etype, arg);
+ }
+ obj_call_init(exc);
+ return exc;
}
static VALUE