Skip to content

Instantly share code, notes, and snippets.

@benolee
Created January 28, 2013 21:21
Show Gist options
  • Select an option

  • Save benolee/4659157 to your computer and use it in GitHub Desktop.

Select an option

Save benolee/4659157 to your computer and use it in GitHub Desktop.
systemu return type differences
$ cat Gemfile
source :rubygems
gem 'systemu'
$ cat wat.rb
require 'systemu'
p systemu 'ls', 'stdout' => '', 'stderr' => ''
$ rbenv shell jruby-1.6.7
$ bundle exec ruby wat.rb
[#<Process::Status: pid=58082,exited(0)>, "Gemfile\nGemfile.lock\nbin\nvendor\nwat.rb\n", ""] # <--- systemu returns an Array instance on JRuby 1.6.7
$ rbenv shell 1.9.3-p374
$ bundle exec ruby wat.rb
#<Process::Status: pid 58184 exit 0> # <--- systemu returns a Process instance on MRI 1.9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment