From: I V Date: 2010-01-08T20:40:11+09:00 Subject: Re: ruby constructor return value? On Thu, 07 Jan 2010 15:13:30 -0500, Thom Wharton wrote: > Basically, I am trying to get new to return nil if construction of the > object fails. I have a strong background in C++ coding, and one thing > that has always irked me about the language is that constructors cant > fail -- the object is always created regardless of whether or not it can > be properly constructed. I'm not sure what you mean here. In both C++ and Ruby, constructors can fail - they do so by raising an exception - and, if they do fail, no object is created.