Hugh Sasse wrote:

/ ...

>> Coding defensively and using sanity checks on the return value of #index
>> and other methods that may return nil would also have helped.
> 
> This doesn't mean that is is undesirable that Ruby do more.

At the expense of runtime speed. Every added hand-holding feature in effect
at runtime decreases runtime speed.

> This is shifting the burden from the developers of ruby
> to the many users of it.

Your suggestion shifts the burden from developers of Ruby code to the end
users of Ruby programs, who would have to put up with time-costly error
detection features running in the background meant to detect and describe
runtime errors that ought to have been caught during the design phase.

IMHO this entire class of problem is better dealt with by better design and
better testing, not more loquacious error messages during runtime.

-- 
Paul Lutus
http://www.arachnoid.com