mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.c (set_arg0): fill argv other than the first with an empty
string instead of NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
615543bf1f
commit
59f4ea7387
2 changed files with 11 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Aug 16 11:09:26 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (set_arg0): fill argv other than the first with an empty
|
||||
string instead of NULL.
|
||||
|
||||
Tue Aug 15 11:21:08 2006 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/smtp.rb: support SMTP/SSL. Thanks Kazuhiro NISHIYAMA.
|
||||
|
|
11
ruby.c
11
ruby.c
|
@ -1079,18 +1079,13 @@ set_arg0(VALUE val, ID id)
|
|||
|
||||
if (i >= len) {
|
||||
i = len;
|
||||
memcpy(origargv[0], s, i);
|
||||
origargv[0][i] = '\0';
|
||||
}
|
||||
else {
|
||||
memcpy(origargv[0], s, i);
|
||||
s = origargv[0] + i;
|
||||
*s++ = '\0';
|
||||
while (++i < len)
|
||||
*s++ = ' ';
|
||||
*s = '\0';
|
||||
if (++i < len) memset(s + 1, ' ', len - i);
|
||||
for (i = 1; i < origargc; i++)
|
||||
origargv[i] = 0;
|
||||
}
|
||||
origargv[i] = s;
|
||||
rb_progname = rb_tainted_str_new2(origargv[0]);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue