Commit 8dd4cd580de3ba7a61a14736eb5063f03e39bfba

Anton Maminov 2012-03-30T15:26:30

error in read_pair method

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/mpd_client.rb b/lib/mpd_client.rb
index fa8f717..a179c5e 100644
--- a/lib/mpd_client.rb
+++ b/lib/mpd_client.rb
@@ -200,7 +200,7 @@ class MPDClient
   def read_pair(separator)
     line = read_line
     return if line.nil?
-    pair = line.split(separator)
+    pair = line.split(separator, 2)
     raise "Could now parse pair: '#{line}'" if pair.size < 2
 
     return pair #Array