Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Commit

Permalink
String conversion as a one-liner
Browse files Browse the repository at this point in the history
Just cleaning up.
  • Loading branch information
sapslaj authored and Jon Yurek committed Sep 1, 2015
1 parent c7b16f0 commit 2a89b71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/cocaine/command_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,8 @@ def shell_quote_all_values(values)

def shell_quote(string)
return "" if string.nil?
if string.respond_to? :to_s
string = string.to_s
end
string = string.to_s if string.respond_to? :to_s

if OS.unix?
if string.empty?
"''"
Expand Down

0 comments on commit 2a89b71

Please sign in to comment.