On Wed, 07 Dec 2005 17:30:17 -0000, 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".
>

What would it do about this (silly) code:

	# russian roulette
	require 'facet/kernel/maybe'
	maybe { require 'fileutils' }

	FileUtils.rm_rf '/'

At that particular line, is FileUtils loaded, or not?

-- 
Ross Bamford - rosco / roscopeco.remove.co.uk
"\e[1;31mL"