I had a problem where a SyntaxError from TMail::Address.parse that kept halting my Delayed::Job queue. I suspect this is because SyntaxError is a core ruby exception. The patch ensures that the parser raises TMail::SyntaxError.
>> TMail::Address.parse "( |"
SyntaxError: unterminated comment
from parser.y:375:in `scan'
from parser.y:375:in `parse_in'
from racc/parser.rb:152:in `_racc_yyparse_c'
from racc/parser.rb:152:in `__send__'
from racc/parser.rb:152:in `yyparse'
from parser.y:366:in `parse'
from parser.y:344:in `parse'
from /Library/Ruby/Gems/1.8/gems/tmail-1.2.3.1/lib/tmail/address.rb:84:in `parse'
from (irb):1
I had a problem where a SyntaxError from TMail::Address.parse that kept halting my Delayed::Job queue. I suspect this is because SyntaxError is a core ruby exception. The patch ensures that the parser raises TMail::SyntaxError.
Here's the patch, suitable for use with
git am
http://gist.github.com/raw/116691/6631781ad06d5f2d10bcd3c41ed0c5910be2d7cd/gistfile1.txtHere's a small example that shows the error: