summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-14 17:20:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-14 17:20:14 +0000
commitf3d25fdd9c58942d5e2d909f16b1dd8adabd21e1 (patch)
treeef0eacfd67e503e34658cc9b21e7797b96f1132b /error.c
parent206efa13561648716e65fc7e87f4967cbb707571 (diff)
* gc.c (id2ref): recycle check should be done by klass == 0.
[ruby-core:01408] * eval.c (Init_Thread): Continuation#[] added. [ruby-talk:79028] * parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs. * parse.y (lhs): ditto. * parse.y (yylex): should return tCOLON3 right after kCLASS. [ruby-talk:78918] * error.c (exc_initialize): was converting argument to string too eagerly. Only check was needed. [ruby-talk:78958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/error.c b/error.c
index f8fbdf7ade..674c87d122 100644
--- a/error.c
+++ b/error.c
@@ -318,12 +318,13 @@ exc_initialize(argc, argv, exc)
VALUE *argv;
VALUE exc;
{
- VALUE mesg;
+ VALUE arg;
- if (rb_scan_args(argc, argv, "01", &mesg) == 1) {
+ if (rb_scan_args(argc, argv, "01", &arg) == 1) {
+ VALUE mesg = arg;
StringValue(mesg); /* ensure mesg can be converted to String */
}
- rb_iv_set(exc, "mesg", mesg);
+ rb_iv_set(exc, "mesg", arg);
rb_iv_set(exc, "bt", Qnil);
return exc;