summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-10 16:53:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-10 16:53:26 +0000
commita9eea1bc50d2d07d4eeee162445feeb18f5b4550 (patch)
tree95915998046c42e4190234b7aa5e749bc344f1ca /error.c
parent520a5549f81b57a72651f7eed5396a1ddecdf34d (diff)
* error.c (syserr_initialize): use stringified object.
[ruby-dev:24768] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7245 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 c67fce9..f4fbb10 100644
--- a/error.c
+++ b/error.c
@@ -908,7 +908,7 @@ syserr_initialize(argc, argv, self)
if (!NIL_P(mesg)) {
VALUE str = mesg;
StringValue(str);
- mesg = rb_str_new(0, strlen(err)+RSTRING(mesg)->len+3);
+ mesg = rb_str_new(0, strlen(err)+RSTRING(str)->len+3);
sprintf(RSTRING(mesg)->ptr, "%s - %.*s", err,
(int)RSTRING(str)->len, RSTRING(str)->ptr);
rb_str_resize(mesg, strlen(RSTRING(mesg)->ptr));