From: Will Dresh Date: 2008-08-31T14:28:17+09:00 Subject: Re: Simple conditional causing hanging? Ryan Davis wrote: > tho, I will say, that returning the class name is bad design smell to > begin with. Returning 'nope' as your alternative is even worse. Yeah, I know. This is not what my program actually does.. I changed the return statement to the class name for debugging purposes, and my else case is entirely different- I just simplified it so that I would only be posting the relevant part of the code, which was the conditional. Ryan Davis wrote: > There is _nothing_ about your code that would cause a hang by calling > #to_s on a class. Something else entirely is going on. Right, that's how I felt when it happened. But if I remove all calls to this method from the program, it does not hang, and like I said earlier, if I change the conditional to something like if ( @thisLine.class == 'NilClass' ) Then the program does not hang, although the code obviously does not function as intended. Thank you for the solution to my problem. @thisLine.nil? worked like a charm. However, I am still bewildered as to why this problem arose in the first place... anyone know? -- Posted via http://www.ruby-forum.com/.