summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-21 15:31:13 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-21 15:31:13 -0700
commited7a1a8b9c9d2104dbcfea8d90f66e1af651785f (patch)
tree60eff6e30c5189db346014c33796a8d5ce0dfd07
parentd17997f59f1d3eac2ed60980724786778c06d6c9 (diff)
downloadruby-libmpd-ed7a1a8b9c9d2104dbcfea8d90f66e1af651785f.tar.gz
ruby-libmpd-ed7a1a8b9c9d2104dbcfea8d90f66e1af651785f.tar.xz
Use gsub when escaping backslashes.
-rw-r--r--mpdlib.rb2
1 files changed, 1 insertions, 1 deletions
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