summaryrefslogtreecommitdiffstats
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
commit0aca00496cbd0e4464d43ba564bc0bc39df5bafc (patch)
tree95915998046c42e4190234b7aa5e749bc344f1ca /error.c
parent3d946f37ddf7277d9f7a59464d310267455be7b5 (diff)
downloadruby-0aca00496cbd0e4464d43ba564bc0bc39df5bafc.tar.gz
ruby-0aca00496cbd0e4464d43ba564bc0bc39df5bafc.tar.xz
ruby-0aca00496cbd0e4464d43ba564bc0bc39df5bafc.zip
* error.c (syserr_initialize): use stringified object.
[ruby-dev:24768] git-svn-id: http://svn.ruby-lang.org/repos/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 c67fce9d3..f4fbb1051 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));