Skip to content

Instantly share code, notes, and snippets.

@davidcpell
Created July 20, 2016 19:12
Show Gist options
  • Save davidcpell/b6832843144014504998b4abf5f64642 to your computer and use it in GitHub Desktop.
Save davidcpell/b6832843144014504998b4abf5f64642 to your computer and use it in GitHub Desktop.
osx/ubuntu Kernel#system
fail "Can't create cartridge: missing 'cartridge' utility" unless system("hash cartridge") # offending code
### UBUNTU COMMAND LINE
$ hash cartridge
$ echo $?
0
### UBUNTU IRB
system("hash cartridge")
=> nil
puts $?
=> ... exit 127
### OSX IRB
system("hash cartridge")
=> true
puts $?
=> ... exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment