Skip to content

Commit

Permalink
change status array of ints to an int (#4362)
Browse files Browse the repository at this point in the history
  • Loading branch information
javierhonduco authored and kares committed Dec 7, 2016
1 parent 587bb74 commit 9291c56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/RubyKernel.java
Expand Up @@ -1537,7 +1537,7 @@ public static IRubyObject system19(ThreadContext context, IRubyObject recv, IRub
if (!needChdir && runtime.getPosix().isNative() && !Platform.IS_WINDOWS) {
// MRI: rb_f_system
long pid;
int[] status = new int[1];
int status;

// #if defined(SIGCLD) && !defined(SIGCHLD)
// # define SIGCHLD SIGCLD
Expand Down Expand Up @@ -1565,8 +1565,8 @@ public static IRubyObject system19(ThreadContext context, IRubyObject recv, IRub
if (pid < 0) {
return runtime.getNil();
}
status[0] = (int)((RubyProcess.RubyStatus) context.getLastExitStatus()).getStatus();
if (status[0] == 0) return runtime.getTrue();
status = (int)((RubyProcess.RubyStatus) context.getLastExitStatus()).getStatus();
if (status == 0) return runtime.getTrue();
return runtime.getFalse();
}

Expand Down

0 comments on commit 9291c56

Please sign in to comment.