Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make NoResponseError and BadResponseError connection failures compati…

…ble with Ruby 1.9
  • Loading branch information...
commit b8e0c80d54ac2e612767754890c97833c98da1ae 1 parent 8c0f454
Jeremy authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/em-imap/connection.rb
View
4 lib/em-imap/connection.rb
@@ -121,9 +121,9 @@ def listen_for_tagged_response(command)
if response.is_a?(Net::IMAP::TaggedResponse) && response.tag == command.tag
case response.name
when "NO"
- command.fail Net::IMAP::NoResponseError.new(response.data.text)
+ command.fail Net::IMAP::NoResponseError.new((RUBY_VERSION[0,3] == "1.8" ? response.data.text : response))
when "BAD"
- command.fail Net::IMAP::BadResponseError.new(response.data.text)
+ command.fail Net::IMAP::BadResponseError.new((RUBY_VERSION[0,3] == "1.8" ? response.data.text : response))
else
command.succeed response
end
Please sign in to comment.
Something went wrong with that request. Please try again.