diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-04-02 10:03:54 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-04-02 10:03:54 +0000 |
commit | b6fe3dae4de7002c2f58bc9cfb993033dff7927d (patch) | |
tree | b017b82c48b45ae98f3ed92acb3863372ed9d77f /error.c | |
parent | a1d8147e4419d81cd93c664b85f7062c89101c87 (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.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |