1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-11-25 09:03:08 +00:00
parent 8e48dc16e9
commit ebab487fcd
14 changed files with 630 additions and 101 deletions

View file

@ -600,6 +600,13 @@ rb_f_system(argc, argv)
VALUE cmd;
int state;
fflush(stdout);
fflush(stderr);
if (argc == 0) {
rb_last_status = INT2FIX(0);
rb_raise(rb_eArgError, "wrong # of arguments");
}
if (TYPE(argv[0]) == T_ARRAY) {
if (RARRAY(argv[0])->len != 2) {
rb_raise(rb_eArgError, "wrong first argument");
@ -619,6 +626,11 @@ rb_f_system(argc, argv)
VALUE cmd;
int state;
if (argc == 0) {
rb_last_status = INT2FIX(0);
rb_raise(rb_eArgError, "wrong # of arguments");
}
if (TYPE(argv[0]) == T_ARRAY) {
if (RARRAY(argv[0])->len != 2) {
rb_raise(rb_eArgError, "wrong first argument");
@ -667,7 +679,7 @@ rb_f_system(argc, argv)
#if defined(USE_CWGUSI)
rb_notimplement();
#else
volatile VALUE prog = 0;
volatile VALUE prog = 0;
int pid;
int i;