atomicobject/constructor — pull request #1 by jacius (2012-09-28 14:19:11+00:00)
Title: Fixed name collision with Constructor::ArgumentError

If you do `raise ArgumentError, "Error message"` from within a class that uses the `constructor ...` class method, there would be an error like `undefined method `join' for "Error message":String`.

This is due to a name collision between the standard ArgumentError and Constructor::ArgumentError classes. The name collision occurs because the `constructor` class method includes the Constructor module into the class that calls `constructor`, thus shadowing the standard ArgumentError class.

Although it is possible to work around this issue by using `raise ::ArgumentError`, I think users of the constructor library should not be expected to do that, especially because the Constructor::ArgumentError class is explicitly hidden from the library documentation.

My patch renames Constructor::ArgumentError to Constructor::ConstructorArgumentError. This might affect users who are explicitly trying to rescue Constructor::ArgumentError. But, I suspect that very few, if any, users are doing that.