From: hal9000@... Date: 2001-07-04T08:43:05+09:00 Subject: [ruby-talk:17199] Re: enhancing Ruby error messages for out of the bound constant Fixnum? > 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_ > I *think* I know what's happening in the second case. Ruby is smarter, not dumber, than you think. It realizes that 8 is not a valid octal digit, so you get a regex of an ASCII 6 followed by a character 8. Since this pattern is not matched, nothing happens. Hal