aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/api_controller_spec.rb
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2013-04-30 11:42:44 +0100
committerMark Longair <mhl@pobox.com>2013-05-16 09:06:27 +0100
commitbe5077d5f1af176c34aadd3dcfc6fd3ac9422a3d (patch)
tree3bb36123545a28f2055d35f309e6771ed12c3624 /spec/controllers/api_controller_spec.rb
parentad0af8f9deb3da28c3630e369b74932d465b349f (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