Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactor the previous commit a little

  • Loading branch information...
commit 0625ac30c4f9dfd5279abcf661852acdb6184709 1 parent a2d01c4
@jyurek jyurek authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/cocaine/command_line.rb
View
6 lib/cocaine/command_line.rb
@@ -80,7 +80,11 @@ def interpolation(vars, key)
def shell_quote(string)
return "" if string.nil?
if self.class.unix?
- string.empty? ? "''" : string.split("'").map{|m| "'#{m}'" }.join("\\'")
+ if string.empty?
+ "''"
+ else
+ string.split("'").map{|m| "'#{m}'" }.join("\\'")
+ end
else
%{"#{string}"}
end

1 comment on commit 0625ac3

@mike-burns
Owner

This could probably be made into one larger if ... elsif ... end block.

Please sign in to comment.
Something went wrong with that request. Please try again.