From ed7a1a8b9c9d2104dbcfea8d90f66e1af651785f Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 21 Jul 2009 15:31:13 -0700 Subject: Use gsub when escaping backslashes. --- mpdlib.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpdlib.rb b/mpdlib.rb index 3b5a27f..8cd14a6 100644 --- a/mpdlib.rb +++ b/mpdlib.rb @@ -20,7 +20,7 @@ class MPD def send_request command # Escape backslashes in command. - @socket.puts command.sub('\\', '\\\\\\') + @socket.puts command.gsub('\\', '\\\\\\') return get_response end -- cgit v1.2.3-70-g09d2