summaryrefslogtreecommitdiff
path: root/mpdlib.rb
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-21 16:18:18 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-21 16:18:18 -0700
commit4265dc8dd0e680d29ed97294b9e698c7675df4e8 (patch)
treebb140533f05f9e20647800d25d9116abbc69a6f5 /mpdlib.rb
parent27490478ea997bdc62b8d029a5317d7924023562 (diff)
downloadruby-libmpd-4265dc8dd0e680d29ed97294b9e698c7675df4e8.tar.gz
ruby-libmpd-4265dc8dd0e680d29ed97294b9e698c7675df4e8.tar.xz
Return true if response is a blank string.
Diffstat (limited to 'mpdlib.rb')
-rw-r--r--mpdlib.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/mpdlib.rb b/mpdlib.rb
index b452e9e..b8e9818 100644
--- a/mpdlib.rb
+++ b/mpdlib.rb
@@ -30,11 +30,14 @@ class MPD
while true
line = @socket.gets
- return response if line == "OK\n"
+ break if line == "OK\n"
return false if line =~ /^ACK/
response << line
end
+
+ return true if response.empty?
+ return response
end
def generate_hash str