Net::IMAP throws .[] for nil class on search

7 views
Skip to first unread message

Kirill Bezrukov

unread,
Mar 23, 2012, 9:45:30 AM3/23/12
to rubyonra...@googlegroups.com
>> require 'net/imap'
>> imap = Net::IMAP.new('imap.yandex.ru', 993, true)
>> imap.login('login', 'password')
>> imap.select('INBOX')
=> #<struct Net::IMAP::TaggedResponse tag="RUBY0010", name="OK", data=#<struct Net::IMAP::ResponseText code=#<struct Net::IMAP::ResponseCode name="READ-WRITE", data=nil>, text=" SELECT completed">, raw_data="RUBY0010 OK [READ-WRITE] SELECT completed\r\n">
>> imap.search(['ALL'])
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

This error throws only with yandex.ru IMAP server

How could Net::IMAP throws ActiveRecord::Base exception?
Reply all
Reply to author
Forward
0 new messages