From: Michel Demazure Date: 2013-04-06T00:35:00+09:00 Subject: Re: Exception Errno::EWOULDBLOCK in net/protocol.rb Tanaka Akira wrote in post #1104577: > > I'm not sure what happen. > > However the expected mechanism is follows. > > IO::WaitReadable and IO::WaitWritable are modules. > IO#read_nonblock should raise an exception, EWOULDBLOCK for example, > extended by > IO::WaitReadable or IO::WaitWritable. > So the rescue clauses should trap the exception. I found where the exception came from. My code was called inside a Qt GUI, using the 'qtbindings' gem. I used a global $DEBUG constant, and the exception was raised by a $DEBUG = true in my code. It desappeared when I renamed $DEBUG to $Debug. Actually, 'qtbindings' has a $DEBUG global, so the exception was raised by 'qtbindings' and not by 'rsolr'. This solves my problem, but maybe the rescue part of net/protocol.rb is not complete, as you say. I am not competent on that... _md -- Posted via http://www.ruby-forum.com/.