MagLev/maglev — Issue #123: Kernel#system not acting like 1.8.7
Author: jc00ke
Created: 2012-02-07 06:55:51+00:00
State: open

I was trying to figure out why `rake` on minitest was outputting a bunch of weird diff messages:

```

Run options: -- --seed 6332

# Running tests:

.lib/minitest/unit.rb: 1: gdiff: not found
diff: missing operand after `diff'
diff: Try `diff --help' for more information.
lib/minitest/unit.rb: 1: gdiff: not found
diff: missing operand after `diff'
diff: Try `diff --help' for more information.
F....lib/minitest/unit.rb: 1: gdiff: not found
diff: missing operand after `diff'
diff: Try `diff --help' for more information.
........lib/minitest/unit.rb: 1: gdiff: not found
diff: missing operand after `diff'
```

It looks like Kernel#system isn't working like it should. In CRuby 1.8.7 the following prints `diff -u` on my Ubuntu machine:

```ruby
d = if system("gdiff", __FILE__, __FILE__)
"gdiff -u" # solaris and kin suck
elsif system("diff", __FILE__, __FILE__)
"diff -u"
else
nil
end

puts d
```

but MagLev prints

```
foo.rb: 1: gdiff: not found
diff: missing operand after `diff'
diff: Try `diff --help' for more information.
nil
```