diff options
author | Mark Longair <mhl@pobox.com> | 2013-04-30 11:42:44 +0100 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-05-16 09:06:27 +0100 |
commit | be5077d5f1af176c34aadd3dcfc6fd3ac9422a3d (patch) | |
tree | 3bb36123545a28f2055d35f309e6771ed12c3624 /spec/controllers/api_controller_spec.rb | |
parent | ad0af8f9deb3da28c3630e369b74932d465b349f (diff) |
Remove an unnecessary use of 'which' in backticks
The use of backticks in `which tnef` means that which(1) is
invoked under /bin/sh, and returns the first executable
matching 'tnef' in the default PATH for /bin/sh. In this
usage, however, Popen also uses /bin/sh to execute the
command, which would run that same executable if just a
bare 'tnef' were used. In summary, I can't see any reason
for the convolution of:
IO.popen("#{`which tnef`.chomp} -K -C #{dir}", "wb") do |f|
... over just:
IO.popen("tnef -K -C #{dir}", "wb") do |f|
... so switch to the latter.
Diffstat (limited to 'spec/controllers/api_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions