From: Ed L Cashin Date: 2001-11-17T01:27:22+09:00 Subject: [ruby-talk:25514] Re: enhancing Ruby error messages for out of the bound constant Fixnum? Guillaume Cottenceau writes: > matz@ruby-lang.org (Yukihiro Matsumoto) writes: > > > [...] > > > |But with Ruby here, it silently does, well, I don't know: > > > > > > > > It considers the pattern /\068/ as \06 (octal 6) and following "8". > > Sould it parse like Perl's? > > Definitely, when you write \067 and then \068, you don't expect that one > is parsed as octal 67 and the other one octal 6 then 8. > > I think it should parse like Perl's.. It's a shame. Ruby is right that eight is not an octal digit, so when ruby sees an eight, there's no ambiguity that the octal number has ended and a decimal number has started. If you write an octal number that contains non-octal digits, then you're probably confused, so it's too bad if the principle of least surprise means least surprise for someone who's confused. I'd be surprised if "8" parsed as an octal digit, since it certainly is not an octal digit. -- --Ed Cashin integrit file-verification system: ecashin@terry.uga.edu http://integrit.sourceforge.net/ Note: If you want me to send you email, don't munge your address.