------art_1301_19053959.1133977154316
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 12/7/05, William E. Rubin <williamerubin / dodgeit.com> wrote:
>
> Thanks for the explanation.  But there certainly could at least be a
> way to produce warnings.  In your example, it could warn (without
> having executed any of your code) that X might be uninitialized.
>
> I'm not saying Ruby should do this as a default, but it would be nice
> to have an option (or a separate tool) to do so.
>
> I mean, I just had a Ruby script crash because one line of code
> contained "RegExp" instead of "Regexp".  This script had been working
> fine for quite some time, but it just happened to get into the
> situation where that line was encountered for the first time.  It would
> have been nice to have had a tool that told me "Warning: RegExp might
> not exist".


That's the exact scenario that unit tests are great for, finding issues in
parts of code that aren't hit often, or nearly at all.  If they're covered
by a unit test though you know, right away that something is wrong, and you
can fix it, without waiting for that scenario to arrive.




--
===Tanner Burson===
tanner.burson / gmail.com
http://tannerburson.com   <---Might even work one day...

------art_1301_19053959.1133977154316--