mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* error.c (syserr_initialize): use stringified object.
[ruby-dev:24768] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7eaf299bf2
commit
20beabcb68
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Nov 11 01:52:52 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* error.c (syserr_initialize): use stringified object.
|
||||
[ruby-dev:24768]
|
||||
|
||||
Wed Nov 10 22:49:01 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/delegate.rb (SimpleDelegator::dup): wrong number of
|
||||
|
|
2
error.c
2
error.c
|
@ -956,7 +956,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));
|
||||
|
|
Loading…
Reference in a new issue