From 87f1748f9a9cd6badd4dc3a2bd1e09512790956b Mon Sep 17 00:00:00 2001 From: Kai Storbeck Date: Wed, 5 Mar 2014 21:56:22 +0100 Subject: [PATCH 1/2] Hotfix for issue #4 The docs seem to say its okay to have an unbind method without arguments. Probably a bug in EM? --- lib/em-irc/client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/em-irc/client.rb b/lib/em-irc/client.rb index 99e02d6..164bdbe 100644 --- a/lib/em-irc/client.rb +++ b/lib/em-irc/client.rb @@ -167,7 +167,7 @@ def ready end # @private - def unbind + def unbind(ignored) trigger(:disconnect) end @@ -177,4 +177,4 @@ def channel?(string) end end end -end \ No newline at end of file +end From 713b9337cfe0b94d62e000fc716d3d4c821b2a2f Mon Sep 17 00:00:00 2001 From: Kai Storbeck Date: Wed, 5 Mar 2014 22:12:31 +0100 Subject: [PATCH 2/2] fix annoying bug in unbind() By looking at commit 9943484309743c255e7478eec88764b6fba7d09e in EM it seems that class.originalmethod(:unbind) is probably returning info about _that_ newly added unbind method and that the documentation in EM is lacking / not updated. --- lib/em-irc/client.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/em-irc/client.rb b/lib/em-irc/client.rb index 164bdbe..d16373c 100644 --- a/lib/em-irc/client.rb +++ b/lib/em-irc/client.rb @@ -167,7 +167,8 @@ def ready end # @private - def unbind(ignored) + def unbind(reason) + log Logger::INFO "Unbind reason: #{reason}" if reason != nil trigger(:disconnect) end