[#1611] set_trace_func/Array#fetch error — "Nathaniel Talbott" <nathaniel@...>

I've reduced the error I reported in ruby-talk:84013 to the following code:

17 messages 2003/10/11

Re: [OT] inconsistency with lexing number bases

From: "daz" <dooby@...10.karoo.co.uk>
Date: 2003-10-15 05:59:46 UTC
List: ruby-core #1633


> um... sm***** cr#ck ...


One part of Ruby which I wish hadn't been modelled on
other languages (Perl ? via C ?) is:

p 010

#-> 8

(i.e. unmodified leading zero implies octal)

Didn't octal die when hex came along ?

I just think that octal should be written explicitly
like the other non-decimals.

It's not uncommon to see numeric fields with leading
zeros and most humans are unlikely to think of any octal
connection, but reading them in without left-stripping
could have caused no end of banking discrepancies.

This design decision would have been taken before cr#ck
was widely available and before Ruby was born, but I
suspect some kind of hallucinogen was involved.

Still, I know it's another of those "break existing code"
things that trap us in the past.


Anonymously,


daz





In This Thread

Prev Next