Created
August 31, 2012 16:43
-
-
Save kwilczynski/3555665 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> ^DC02FX09GDH2G:~ krzysztof.wilczynski$ irb | |
>> require 'open3' | |
=> true | |
>> p = ENV['PATH'] ; ENV['PATH'] = '' | |
=> "" | |
>> Open3.popen3('date') {|i,o,e| o.gets } | |
=> nil | |
>> ENV['PATH'] = p | |
=> "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/munki" | |
>> Open3.popen3('date') {|i,o,e| o.gets } | |
=> "Fri 31 Aug 2012 17:43:17 BST\n" | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment