From: Guillaume Cottenceau Date: 2001-07-04T07:22:19+09:00 Subject: [ruby-talk:17198] enhancing Ruby error messages for out of the bound constant Fixnum? Hi, When you try to use out-of-the-bound octal values with Perl, you get a warning when -w, see: [gc@obiwan ~] echo -e "_123456789_" | perl -w -pe 's/\067/x/' _123456x89_ [gc@obiwan ~] echo -e "_123456789_" | perl -w -pe 's/\068/x/' Illegal octal digit '8' ignored at -e line 1. Illegal octal digit '8' ignored at -e line 1. _123456789_ [gc@obiwan ~] echo -e "_123456789_" | perl -w -pe 's/\070/x/' _1234567x9_ But with Ruby here, it silently does, well, I don't know: [gc@obiwan ~] echo -e "_123456789_" | ruby -w -pe 'sub(/\067/,"x")' _123456x89_ [gc@obiwan ~] echo -e "_123456789_" | ruby -w -pe 'sub(/\068/,"x")' _123456789_ [gc@obiwan ~] echo -e "_123456789_" | ruby -w -pe 'sub(/\070/,"x")' _1234567x9_ While in the following situation it behaves as expected: [gc@obiwan ~] ruby -e 'p 067' 55 [gc@obiwan ~] ruby -e 'p 068' -e:1: parse error -- Guillaume Cottenceau - http://mandrakesoft.com/~gc/